<!-- HTML header for doxygen 1.9.6-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>CMSIS-Driver: MCI Interface</title>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="tabs.js"></script>
<script type="text/javascript" src="footer.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
  $(document).ready(function() { init_search(); });
/* @license-end */
</script>
<script type="text/javascript" src="darkmode_toggle.js"></script>
<link href="extra_stylesheet.css" rel="stylesheet" type="text/css"/>
<link href="extra_navtree.css" rel="stylesheet" type="text/css"/>
<link href="extra_search.css" rel="stylesheet" type="text/css"/>
<link href="extra_tabs.css" rel="stylesheet" type="text/css"/>
<link href="version.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../version.js"></script>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 55px;">
  <td id="projectlogo" style="padding: 1.5em;"><img alt="Logo" src="cmsis_logo_white_small.png"/></td>
  <td style="padding-left: 1em; padding-bottom: 1em;padding-top: 1em;">
   <div id="projectname">CMSIS-Driver
   &#160;<span id="projectnumber"><script type="text/javascript">
     <!--
     writeHeader.call(this);
     writeVersionDropdown.call(this, "CMSIS-Driver");
     //-->
    </script>
   </span>
   </div>
   <div id="projectbrief">Peripheral Interface for Middleware and Application Code</div>
  </td>
   <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <span id="MSearchSelect"                onmouseover="return searchBox.OnSearchSelectShow()"                onmouseout="return searchBox.OnSearchSelectHide()">&#160;</span>
          <input type="text" id="MSearchField" value="" placeholder="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.svg" alt=""/></a>
          </span>
        </div>
</td>
  <!--END !PROJECT_NAME-->
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<div id="CMSISnav" class="tabs1">
  <ul class="tablist">
    <script type="text/javascript">
      writeComponentTabs.call(this);
    </script>
  </ul>
</div>
<script type="text/javascript">
  writeSubComponentTabs.call(this);
</script>
<!-- Generated by Doxygen 1.9.6 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('group__mci__interface__gr.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div class="header">
  <div class="summary">
<a href="#groups">Content</a> &#124;
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle"><div class="title">MCI Interface</div></div>
</div><!--header-->
<div class="contents">

<p>Driver API for Memory Card Interface using SD/MMC interface (Driver_MCI.h)  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="groups" name="groups"></a>
Content</h2></td></tr>
<tr class="memitem:group__mci__event__gr"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mci__event__gr.html">MCI Events</a></td></tr>
<tr class="memdesc:group__mci__event__gr"><td class="mdescLeft">&#160;</td><td class="mdescRight">The MCI driver generates call back events that are notified via the function <a class="el" href="group__mci__interface__gr.html#gaac2dbd1c1a98436938c5d0d6248cb700">ARM_MCI_SignalEvent</a>. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:group__mci__control__gr"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mci__control__gr.html">MCI Control Codes</a></td></tr>
<tr class="memdesc:group__mci__control__gr"><td class="mdescLeft">&#160;</td><td class="mdescRight">Configure and control the MCI using the <a class="el" href="group__mci__interface__gr.html#gaec0506a2aa4ae75cf6bc02528f36fe30">ARM_MCI_Control</a>. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:group__mci__send__command__flags__ctrls"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mci__send__command__flags__ctrls.html">MCI Send Command Flags</a></td></tr>
<tr class="memdesc:group__mci__send__command__flags__ctrls"><td class="mdescLeft">&#160;</td><td class="mdescRight">Specify various options for sending commands to the card and the expected response. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:group__mci__transfer__ctrls"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mci__transfer__ctrls.html">MCI Transfer Controls</a></td></tr>
<tr class="memdesc:group__mci__transfer__ctrls"><td class="mdescLeft">&#160;</td><td class="mdescRight">Specify data transfer mode. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:group__mci__card__power__ctrls"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mci__card__power__ctrls.html">MCI Card Power Controls</a></td></tr>
<tr class="memdesc:group__mci__card__power__ctrls"><td class="mdescLeft">&#160;</td><td class="mdescRight">Specify Memory Card Power supply voltage. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:structARM__DRIVER__MCI"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mci__interface__gr.html#structARM__DRIVER__MCI">ARM_DRIVER_MCI</a></td></tr>
<tr class="memdesc:structARM__DRIVER__MCI"><td class="mdescLeft">&#160;</td><td class="mdescRight">Access structure of the MCI Driver.  <a href="group__mci__interface__gr.html#structARM__DRIVER__MCI">More...</a><br /></td></tr>
<tr class="separator:structARM__DRIVER__MCI"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:structARM__MCI__CAPABILITIES"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mci__interface__gr.html#structARM__MCI__CAPABILITIES">ARM_MCI_CAPABILITIES</a></td></tr>
<tr class="memdesc:structARM__MCI__CAPABILITIES"><td class="mdescLeft">&#160;</td><td class="mdescRight">MCI Driver Capabilities.  <a href="group__mci__interface__gr.html#structARM__MCI__CAPABILITIES">More...</a><br /></td></tr>
<tr class="separator:structARM__MCI__CAPABILITIES"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:structARM__MCI__STATUS"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mci__interface__gr.html#structARM__MCI__STATUS">ARM_MCI_STATUS</a></td></tr>
<tr class="memdesc:structARM__MCI__STATUS"><td class="mdescLeft">&#160;</td><td class="mdescRight">MCI Status.  <a href="group__mci__interface__gr.html#structARM__MCI__STATUS">More...</a><br /></td></tr>
<tr class="separator:structARM__MCI__STATUS"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="typedef-members" name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ga0d14651f6788c1ffd81544602565faf1"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mci__interface__gr.html#ga0d14651f6788c1ffd81544602565faf1">ARM_MCI_SignalEvent_t</a>) (uint32_t event)</td></tr>
<tr class="memdesc:ga0d14651f6788c1ffd81544602565faf1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__mci__interface__gr.html#gaac2dbd1c1a98436938c5d0d6248cb700">ARM_MCI_SignalEvent</a> : Signal MCI Card Event.  <br /></td></tr>
<tr class="separator:ga0d14651f6788c1ffd81544602565faf1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga3418183015dbf3025b94eebaedb00ab1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__common__drv__gr.html#structARM__DRIVER__VERSION">ARM_DRIVER_VERSION</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mci__interface__gr.html#ga3418183015dbf3025b94eebaedb00ab1">ARM_MCI_GetVersion</a> (void)</td></tr>
<tr class="memdesc:ga3418183015dbf3025b94eebaedb00ab1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get driver version.  <br /></td></tr>
<tr class="separator:ga3418183015dbf3025b94eebaedb00ab1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7e5a78b6e6409189833a0b72a0a3c48a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__mci__interface__gr.html#structARM__MCI__CAPABILITIES">ARM_MCI_CAPABILITIES</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mci__interface__gr.html#ga7e5a78b6e6409189833a0b72a0a3c48a">ARM_MCI_GetCapabilities</a> (void)</td></tr>
<tr class="memdesc:ga7e5a78b6e6409189833a0b72a0a3c48a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get driver capabilities.  <br /></td></tr>
<tr class="separator:ga7e5a78b6e6409189833a0b72a0a3c48a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6f34d4ab362e596ddaf23aac093268cf"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mci__interface__gr.html#ga6f34d4ab362e596ddaf23aac093268cf">ARM_MCI_Initialize</a> (<a class="el" href="group__mci__interface__gr.html#ga0d14651f6788c1ffd81544602565faf1">ARM_MCI_SignalEvent_t</a> cb_event)</td></tr>
<tr class="memdesc:ga6f34d4ab362e596ddaf23aac093268cf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize the Memory Card Interface.  <br /></td></tr>
<tr class="separator:ga6f34d4ab362e596ddaf23aac093268cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaef8183e77797e74997551d03646d42c2"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mci__interface__gr.html#gaef8183e77797e74997551d03646d42c2">ARM_MCI_Uninitialize</a> (void)</td></tr>
<tr class="memdesc:gaef8183e77797e74997551d03646d42c2"><td class="mdescLeft">&#160;</td><td class="mdescRight">De-initialize Memory Card Interface.  <br /></td></tr>
<tr class="separator:gaef8183e77797e74997551d03646d42c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga19752749d04ed22dc91c4294645e0244"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mci__interface__gr.html#ga19752749d04ed22dc91c4294645e0244">ARM_MCI_PowerControl</a> (<a class="el" href="group__common__drv__gr.html#ga47d6d7c31f88f3b8ae4aaf9d8444afa5">ARM_POWER_STATE</a> state)</td></tr>
<tr class="memdesc:ga19752749d04ed22dc91c4294645e0244"><td class="mdescLeft">&#160;</td><td class="mdescRight">Control Memory Card Interface Power.  <br /></td></tr>
<tr class="separator:ga19752749d04ed22dc91c4294645e0244"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab161f80e0eda2815f3e0ebbba1314ff0"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mci__interface__gr.html#gab161f80e0eda2815f3e0ebbba1314ff0">ARM_MCI_CardPower</a> (uint32_t voltage)</td></tr>
<tr class="memdesc:gab161f80e0eda2815f3e0ebbba1314ff0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set Memory Card Power supply voltage.  <br /></td></tr>
<tr class="separator:gab161f80e0eda2815f3e0ebbba1314ff0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga012fca8f1ce5366fce14b708c771c635"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mci__interface__gr.html#ga012fca8f1ce5366fce14b708c771c635">ARM_MCI_ReadCD</a> (void)</td></tr>
<tr class="memdesc:ga012fca8f1ce5366fce14b708c771c635"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read Card Detect (CD) state.  <br /></td></tr>
<tr class="separator:ga012fca8f1ce5366fce14b708c771c635"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3d70286918405ac81fa795c7d09dc6fd"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mci__interface__gr.html#ga3d70286918405ac81fa795c7d09dc6fd">ARM_MCI_ReadWP</a> (void)</td></tr>
<tr class="memdesc:ga3d70286918405ac81fa795c7d09dc6fd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read Write Protect (WP) state.  <br /></td></tr>
<tr class="separator:ga3d70286918405ac81fa795c7d09dc6fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5a431da89feabc2b4bc0c27943dff6f2"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mci__interface__gr.html#ga5a431da89feabc2b4bc0c27943dff6f2">ARM_MCI_SendCommand</a> (uint32_t cmd, uint32_t arg, uint32_t flags, uint32_t *response)</td></tr>
<tr class="memdesc:ga5a431da89feabc2b4bc0c27943dff6f2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Send Command to card and get the response.  <br /></td></tr>
<tr class="separator:ga5a431da89feabc2b4bc0c27943dff6f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaaec681bcd8e6811c5743e33ee0f35ed1"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mci__interface__gr.html#gaaec681bcd8e6811c5743e33ee0f35ed1">ARM_MCI_SetupTransfer</a> (uint8_t *data, uint32_t block_count, uint32_t block_size, uint32_t mode)</td></tr>
<tr class="memdesc:gaaec681bcd8e6811c5743e33ee0f35ed1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Setup read or write transfer operation.  <br /></td></tr>
<tr class="separator:gaaec681bcd8e6811c5743e33ee0f35ed1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3dfcf7b7186b711f9b63a096be816fe5"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mci__interface__gr.html#ga3dfcf7b7186b711f9b63a096be816fe5">ARM_MCI_AbortTransfer</a> (void)</td></tr>
<tr class="memdesc:ga3dfcf7b7186b711f9b63a096be816fe5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Abort current read/write data transfer.  <br /></td></tr>
<tr class="separator:ga3dfcf7b7186b711f9b63a096be816fe5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaec0506a2aa4ae75cf6bc02528f36fe30"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mci__interface__gr.html#gaec0506a2aa4ae75cf6bc02528f36fe30">ARM_MCI_Control</a> (uint32_t control, uint32_t arg)</td></tr>
<tr class="memdesc:gaec0506a2aa4ae75cf6bc02528f36fe30"><td class="mdescLeft">&#160;</td><td class="mdescRight">Control MCI Interface.  <br /></td></tr>
<tr class="separator:gaec0506a2aa4ae75cf6bc02528f36fe30"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8d61aa42ce78d1864fa928c1f273cbd9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__mci__interface__gr.html#structARM__MCI__STATUS">ARM_MCI_STATUS</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mci__interface__gr.html#ga8d61aa42ce78d1864fa928c1f273cbd9">ARM_MCI_GetStatus</a> (void)</td></tr>
<tr class="memdesc:ga8d61aa42ce78d1864fa928c1f273cbd9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get MCI status.  <br /></td></tr>
<tr class="separator:ga8d61aa42ce78d1864fa928c1f273cbd9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaac2dbd1c1a98436938c5d0d6248cb700"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mci__interface__gr.html#gaac2dbd1c1a98436938c5d0d6248cb700">ARM_MCI_SignalEvent</a> (uint32_t event)</td></tr>
<tr class="memdesc:gaac2dbd1c1a98436938c5d0d6248cb700"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback function that signals a MCI Card Event.  <br /></td></tr>
<tr class="separator:gaac2dbd1c1a98436938c5d0d6248cb700"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Description</h2>
<p>Driver API for Memory Card Interface using SD/MMC interface (Driver_MCI.h) </p>
<p>The <b>Memory Card Interface</b> (MCI) implements the hardware abstraction layer for Secure Digital (SD) and Multi Media Card (MMC) memory that is typically used as file storage. For embedded systems, SD/MMC devices are available as memory cards in several forms (SD, miniSD, microSD, MMC, MMCmicro) or as non-removable device es that are directly soldered to the PCB (eMMC). <br  />
</p>
<p><b>References:</b> </p><ul>
<li>Wikipedia offers more information about the <a href="https://en.wikipedia.org/wiki/SD_card" target="_blank"><b>Secure Digital</b> memory</a>.</li>
<li>Wikipedia offers more information about the <a href="https://en.wikipedia.org/wiki/MultiMediaCard" target="_blank"><b>MultiMediaCard</b></a>.</li>
<li>The SD Association provides detailed documentation under <a href="https://www.sdcard.org">www.sdcard.org</a>.</li>
<li>The MultiMediaCard Association (merged with JEDEC) provides detailed documentation under <a href="https://www.jedec.org">www.jedec.org</a>.</li>
</ul>
<p><b>Block Diagram</b></p>
<p>The MCI driver allows you to exchange data of the SD/MMC memory via SD/MMC interface.</p>
<p>The following modes are supported by SD/MMC memory cards:</p>
<ul>
<li>SPI bus mode: Serial Peripheral Interface Bus supported by most microcontrollers.</li>
<li>1-bit SD/MMC Bus mode: proprietary data transfer protocol supported by SD/MMC interfaces.</li>
<li>4-bit SD/MMC Bus mode: high-speed version of the SD/MMC interface using 4 data I/O pins.</li>
<li>8-bit SD/MMC Bus mode: high-speed version of the SD/MMC interface using 8 data I/O pins.</li>
</ul>
<div class="image">
<img src="SPI_BusMode.png" alt=""/>
<div class="caption">
SD memory connected via SPI interface</div></div>
 <p>&#160;</p>
<div class="image">
<img src="SD_1BitBusMode.png" alt=""/>
<div class="caption">
SD memory connected via 1-bit SD Bus Mode</div></div>
 <p>&#160;</p>
<div class="image">
<img src="SD_4BitBusMode.png" alt=""/>
<div class="caption">
SD memory connected via 4-bit SD Bus Mode</div></div>
<p><b>MCI API</b></p>
<p>The following header files define the Application Programming Interface (API) for the MCI interface:</p><ul>
<li><b>Driver_MCI.h</b> : Driver API for Memory Card Interface using SD/MMC interface</li>
</ul>
<p>The driver implementation is a typical part of the Device Family Pack (DFP) that supports the peripherals of the microcontroller family.</p>
<dl class="section note"><dt>Note</dt><dd>For parameters, the value marked with (default) is the setting after the driver initialization.</dd></dl>
<p><b>Driver Functions</b></p>
<p>The driver functions are published in the access struct as explained in <a class="el" href="theoryOperation.html#DriverFunctions">Common Driver Functions</a></p><ul>
<li><a class="el" href="group__mci__interface__gr.html#structARM__DRIVER__MCI">ARM_DRIVER_MCI</a> : access struct for MCI driver functions</li>
</ul>
<p><b>Example Code</b></p>
<p>The following example code shows the usage of the MCI interface.</p>
<div class="fragment"><div class="line"> </div>
<div class="line"><span class="preprocessor">#include &quot;<a class="code" href="Driver__MCI_8h.html">Driver_MCI.h</a>&quot;</span></div>
<div class="line"> </div>
<div class="line"> </div>
<div class="line"><span class="comment">/* Usage example: ARM_MCI_Initialize ----------------------------------------*/</span></div>
<div class="line"> </div>
<div class="line"><span class="comment">// ARM_MCI_SignalEvent callback function prototype</span></div>
<div class="line"><span class="keywordtype">void</span> MCI_SignalEvent_Callback (uint32_t event);</div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">void</span> init_driver (<a class="code hl_struct" href="group__mci__interface__gr.html#structARM__DRIVER__MCI">ARM_DRIVER_MCI</a> *drv) {</div>
<div class="line">  int32_t status;</div>
<div class="line">  </div>
<div class="line">  status = drv-&gt;<a class="code hl_variable" href="group__mci__interface__gr.html#a85b30bcbe4c9747c19cce2000d5684d3">Initialize</a> (&amp;MCI_SignalEvent_Callback);</div>
<div class="line">  </div>
<div class="line">  <span class="keywordflow">if</span> (status != <a class="code hl_define" href="group__execution__status.html#ga85752c5de59e8adeb001e35ff5be6be7">ARM_DRIVER_OK</a>) {</div>
<div class="line">    <span class="comment">// Initialization and event callback registration failed</span></div>
<div class="line">  }</div>
<div class="line">}</div>
<div class="line"> </div>
<div class="line"><span class="comment">/* Usage example: ARM_MCI_Uninitialize --------------------------------------*/</span></div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">void</span> uninit_driver (<a class="code hl_struct" href="group__mci__interface__gr.html#structARM__DRIVER__MCI">ARM_DRIVER_MCI</a> *drv) {</div>
<div class="line">  int32_t status;</div>
<div class="line">  </div>
<div class="line">  status = drv-&gt;<a class="code hl_variable" href="group__mci__interface__gr.html#a5ce2b3d7a3a07099bf07d1eb253e92e3">Uninitialize</a> ();</div>
<div class="line">  </div>
<div class="line">  <span class="keywordflow">if</span> (status == <a class="code hl_define" href="group__execution__status.html#ga85752c5de59e8adeb001e35ff5be6be7">ARM_DRIVER_OK</a>) {</div>
<div class="line">    <span class="comment">// Driver successfully uninitialized</span></div>
<div class="line">  }</div>
<div class="line">}</div>
<div class="line"> </div>
<div class="line"><span class="comment">/* Usage example: ARM_MCI_PowerControl --------------------------------------*/</span></div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">void</span> control_driver_power (<a class="code hl_struct" href="group__mci__interface__gr.html#structARM__DRIVER__MCI">ARM_DRIVER_MCI</a> *drv, <span class="keywordtype">bool</span> enable) {</div>
<div class="line">  int32_t status;</div>
<div class="line">  </div>
<div class="line">  <span class="keywordflow">if</span> (enable == <span class="keyword">true</span>) {</div>
<div class="line">    status = drv-&gt;<a class="code hl_variable" href="group__mci__interface__gr.html#a24ebae5c6011631f76027f9a16eaf5ce">PowerControl</a> (<a class="code hl_enumvalue" href="Driver__Common_8h.html#ga47d6d7c31f88f3b8ae4aaf9d8444afa5abed52b77a9ce4775570e44a842b1295e">ARM_POWER_FULL</a>);</div>
<div class="line">  }</div>
<div class="line">  <span class="keywordflow">else</span> {</div>
<div class="line">    status = drv-&gt;<a class="code hl_variable" href="group__mci__interface__gr.html#a24ebae5c6011631f76027f9a16eaf5ce">PowerControl</a> (<a class="code hl_enumvalue" href="Driver__Common_8h.html#ga47d6d7c31f88f3b8ae4aaf9d8444afa5ab6f5becc85ebd51c3dd2524a95d2ca35">ARM_POWER_OFF</a>);</div>
<div class="line">  }</div>
<div class="line">  </div>
<div class="line">  <span class="keywordflow">if</span> (status == <a class="code hl_define" href="group__execution__status.html#ga85752c5de59e8adeb001e35ff5be6be7">ARM_DRIVER_OK</a>) {</div>
<div class="line">    <span class="comment">// Driver power enabled/disabled</span></div>
<div class="line">  }</div>
<div class="line">}</div>
<div class="line"> </div>
<div class="line"><span class="comment">/* Usage example: ARM_MCI_CardPower -----------------------------------------*/</span></div>
<div class="line"> </div>
<div class="line"><a class="code hl_struct" href="group__mci__interface__gr.html#structARM__MCI__CAPABILITIES">ARM_MCI_CAPABILITIES</a> drv_capabilities;</div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">void</span> set_card_vdd_3v3 (<a class="code hl_struct" href="group__mci__interface__gr.html#structARM__DRIVER__MCI">ARM_DRIVER_MCI</a> *drv) {</div>
<div class="line">  int32_t status;</div>
<div class="line">  </div>
<div class="line">  <span class="keywordflow">if</span> (drv_capabilities.<a class="code hl_variable" href="group__mci__interface__gr.html#a414baec222a72be862e262f02b821dce">vdd</a> == 1U) {</div>
<div class="line">    <span class="comment">// Power switching to 3.3V supported</span></div>
<div class="line">    status = drv-&gt;<a class="code hl_variable" href="group__mci__interface__gr.html#ac5f226aab1d575a4d6c4eca71cdd4a5b">CardPower</a> (<a class="code hl_define" href="group__mci__card__power__ctrls.html#ga565ecd36c8d0379fb4172da577cc540d">ARM_MCI_POWER_VDD_3V3</a>);</div>
<div class="line">    </div>
<div class="line">    <span class="keywordflow">if</span> (status == <a class="code hl_define" href="group__execution__status.html#ga85752c5de59e8adeb001e35ff5be6be7">ARM_DRIVER_OK</a>) {</div>
<div class="line">      <span class="comment">// Card power set to 3.3V</span></div>
<div class="line">    }</div>
<div class="line">  }</div>
<div class="line">}</div>
<div class="line"> </div>
<div class="line"><span class="comment">/* Usage example: ARM_MCI_ReadCD --------------------------------------------*/</span></div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">void</span> read_card_detect_state (<a class="code hl_struct" href="group__mci__interface__gr.html#structARM__DRIVER__MCI">ARM_DRIVER_MCI</a> *drv) {</div>
<div class="line">  int32_t status;</div>
<div class="line">  </div>
<div class="line">  status = drv-&gt;<a class="code hl_variable" href="group__mci__interface__gr.html#ae00aa7cf8f0c0c7e2225b3048cbded13">ReadCD</a>();</div>
<div class="line">  </div>
<div class="line">  <span class="keywordflow">if</span> (status == 1) {</div>
<div class="line">    <span class="comment">// Memory card is detected</span></div>
<div class="line">  }</div>
<div class="line">  <span class="keywordflow">else</span> {</div>
<div class="line">    <span class="keywordflow">if</span> (status == 0) {</div>
<div class="line">      <span class="comment">// Memory card is not detected</span></div>
<div class="line">    }</div>
<div class="line">    <span class="keywordflow">else</span> {</div>
<div class="line">      <span class="comment">// Error reading card detect pin state</span></div>
<div class="line">    }</div>
<div class="line">  }</div>
<div class="line">}</div>
<div class="line"> </div>
<div class="line"><span class="comment">/* Usage example: ARM_MCI_ReadWP --------------------------------------------*/</span></div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">void</span> read_write_protect_state (<a class="code hl_struct" href="group__mci__interface__gr.html#structARM__DRIVER__MCI">ARM_DRIVER_MCI</a> *drv) {</div>
<div class="line">  int32_t status;</div>
<div class="line">  </div>
<div class="line">  status = drv-&gt;<a class="code hl_variable" href="group__mci__interface__gr.html#ab023e8ec9252d65026c21ee84b573890">ReadWP</a>();</div>
<div class="line">  </div>
<div class="line">  <span class="keywordflow">if</span> (status == 1) {</div>
<div class="line">    <span class="comment">// Memory card write protection is enabled</span></div>
<div class="line">  }</div>
<div class="line">  <span class="keywordflow">else</span> {</div>
<div class="line">    <span class="keywordflow">if</span> (status == 0) {</div>
<div class="line">      <span class="comment">// Memory card write protection is disabled</span></div>
<div class="line">    }</div>
<div class="line">    <span class="keywordflow">else</span> {</div>
<div class="line">      <span class="comment">// Error reading write protect pin state</span></div>
<div class="line">    }</div>
<div class="line">  }</div>
<div class="line">}</div>
<div class="line"> </div>
<div class="line"><span class="comment">/* Usage example: ARM_MCI_SendCommand ---------------------------------------*/</span></div>
<div class="line"> </div>
<div class="line"><span class="keyword">volatile</span> uint32_t MCI_Events;</div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">void</span> MCI_SignalEvent_Callback (uint32_t event) {</div>
<div class="line">  <span class="comment">// Save current event</span></div>
<div class="line">  MCI_Events |= event;</div>
<div class="line">}</div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">void</span> send_CMD0 (<a class="code hl_struct" href="group__mci__interface__gr.html#structARM__DRIVER__MCI">ARM_DRIVER_MCI</a> *drv) {</div>
<div class="line">  int32_t  status;</div>
<div class="line">  uint32_t cmd;</div>
<div class="line"> </div>
<div class="line">  MCI_Events = 0U; <span class="comment">//Clear MCI driver event flags</span></div>
<div class="line">  cmd = 0U;        <span class="comment">// Set GO_IDLE_STATE command code</span></div>
<div class="line"> </div>
<div class="line">  status = drv-&gt;<a class="code hl_variable" href="group__mci__interface__gr.html#a607f96af38f877b34a937427ebc675de">SendCommand</a> (cmd, 0U, <a class="code hl_define" href="group__mci__send__command__flags__ctrls.html#ga81606bd94ce782e2c3764b913f929f60">ARM_MCI_CARD_INITIALIZE</a> | <a class="code hl_define" href="group__mci__send__command__flags__ctrls.html#ga70934cef80884e8c75fb4eebf8452118">ARM_MCI_RESPONSE_NONE</a>, NULL);</div>
<div class="line"> </div>
<div class="line">  <span class="keywordflow">if</span> (status == <a class="code hl_define" href="group__execution__status.html#ga85752c5de59e8adeb001e35ff5be6be7">ARM_DRIVER_OK</a>) {</div>
<div class="line">    <span class="comment">/* Wait for event */</span></div>
<div class="line">    <span class="keywordflow">while</span> ((MCI_Events &amp; <a class="code hl_define" href="group__mci__event__gr.html#gae69356c75d55103d93ef91ac1bc02b49">ARM_MCI_EVENT_COMMAND_COMPLETE</a>) == 0U);</div>
<div class="line">    <span class="comment">// Command was successfully sent to memory card</span></div>
<div class="line">    <span class="comment">// ..</span></div>
<div class="line">  }</div>
<div class="line">  <span class="keywordflow">else</span> {</div>
<div class="line">    <span class="comment">// Error</span></div>
<div class="line">  }</div>
<div class="line">}</div>
<div class="line"> </div>
<div class="line"><span class="comment">/* Usage example: ARM_MCI_SetupTransfer -------------------------------------*/</span></div>
<div class="line"> </div>
<div class="line"><span class="keyword">volatile</span> uint32_t MCI_Events;</div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">void</span> MCI_SignalEvent_Callback (uint32_t event) {</div>
<div class="line">  MCI_Events |= event;  <span class="comment">// Save current event</span></div>
<div class="line">}</div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">void</span> read_sector (<a class="code hl_struct" href="group__mci__interface__gr.html#structARM__DRIVER__MCI">ARM_DRIVER_MCI</a> *drv, uint8_t *buf, uint32_t sz) {</div>
<div class="line">  int32_t status;</div>
<div class="line">  uint32_t cmd, arg;</div>
<div class="line">  uint32_t resp;</div>
<div class="line"> </div>
<div class="line">  <span class="keywordflow">if</span> (sz &lt; 512U) {</div>
<div class="line">    <span class="comment">// Invalid buffer size, sector consists of 512 bytes</span></div>
<div class="line">    <span class="comment">//...</span></div>
<div class="line">  }</div>
<div class="line"> </div>
<div class="line">  status = drv-&gt;<a class="code hl_variable" href="group__mci__interface__gr.html#ac28f754289ae6d3783e7c18a965ee3f8">SetupTransfer</a> (buf, 1U, 512U, <a class="code hl_define" href="group__mci__transfer__ctrls.html#gaa6f3be235a9dce5c66be8fe64f399846">ARM_MCI_TRANSFER_READ</a> | <a class="code hl_define" href="group__mci__transfer__ctrls.html#ga4ced782e7c0c70d5f0edbddd1e48323b">ARM_MCI_TRANSFER_BLOCK</a>);</div>
<div class="line"> </div>
<div class="line">  <span class="keywordflow">if</span> (status == <a class="code hl_define" href="group__execution__status.html#ga85752c5de59e8adeb001e35ff5be6be7">ARM_DRIVER_OK</a>) {</div>
<div class="line">    MCI_Events = 0U; <span class="comment">//Clear MCI driver event flags</span></div>
<div class="line"> </div>
<div class="line">    cmd = 17U;       <span class="comment">// Set READ_SINGLE_BLOCK command</span></div>
<div class="line">    arg = 0U;        <span class="comment">// Set sector number</span></div>
<div class="line"> </div>
<div class="line">    status  = drv-&gt;<a class="code hl_variable" href="group__mci__interface__gr.html#a607f96af38f877b34a937427ebc675de">SendCommand</a> (cmd, arg, <a class="code hl_define" href="group__mci__send__command__flags__ctrls.html#gaa5ddf1cf772b234e3c247039effd0e7b">ARM_MCI_RESPONSE_SHORT</a> | <a class="code hl_define" href="group__mci__send__command__flags__ctrls.html#ga6ab3f4c1a2bf0fdb81fbcf7a5698f2de">ARM_MCI_RESPONSE_CRC</a> | <a class="code hl_define" href="group__mci__send__command__flags__ctrls.html#ga8aa566f69aa74ed416213df6ca3267bd">ARM_MCI_TRANSFER_DATA</a>, &amp;resp);</div>
<div class="line"> </div>
<div class="line">    <span class="keywordflow">if</span> (status == <a class="code hl_define" href="group__execution__status.html#ga85752c5de59e8adeb001e35ff5be6be7">ARM_DRIVER_OK</a>) {</div>
<div class="line">      <span class="comment">/* Wait for event */</span></div>
<div class="line">      <span class="keywordflow">while</span> ((MCI_Events &amp; <a class="code hl_define" href="group__mci__event__gr.html#gae69356c75d55103d93ef91ac1bc02b49">ARM_MCI_EVENT_COMMAND_COMPLETE</a>) == 0U);</div>
<div class="line">      <span class="comment">// Command was successfully sent to memory card</span></div>
<div class="line">      <span class="keywordflow">if</span> ((resp &amp; 0x03U) == 0U) {</div>
<div class="line">        <span class="comment">// Sector number is valid, wait until data transfer completes</span></div>
<div class="line">        <span class="keywordflow">while</span> ((MCI_Events &amp; <a class="code hl_define" href="group__mci__event__gr.html#gabc3c468dedaed890683360f2c5c65bea">ARM_MCI_EVENT_TRANSFER_COMPLETE</a>) == 0U);</div>
<div class="line">        <span class="comment">// Data was successfully read from memory card</span></div>
<div class="line">        <span class="comment">// ...</span></div>
<div class="line">      }</div>
<div class="line">    }</div>
<div class="line">  }</div>
<div class="line">}</div>
<div class="line"> </div>
<div class="line"><span class="comment">/* Usage example: ARM_MCI_AbortTransfer -------------------------------------*/</span></div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">void</span> abort_data_transfer (<a class="code hl_struct" href="group__mci__interface__gr.html#structARM__DRIVER__MCI">ARM_DRIVER_MCI</a> *drv) {</div>
<div class="line">  <a class="code hl_struct" href="group__mci__interface__gr.html#structARM__MCI__STATUS">ARM_MCI_STATUS</a> drv_status;</div>
<div class="line"> </div>
<div class="line">  drv_status = drv-&gt;<a class="code hl_variable" href="group__mci__interface__gr.html#a8e6e71480a5ec1575b6471ce3d32117d">GetStatus</a>();</div>
<div class="line">  </div>
<div class="line">  <span class="keywordflow">if</span> (drv_status.<a class="code hl_variable" href="group__mci__interface__gr.html#a2655d3422b720097b091a28e8bbcea8f">transfer_active</a> == 1U) {</div>
<div class="line">    <span class="comment">// Data transfer is active, abort the transfer</span></div>
<div class="line">    <span class="keywordflow">if</span> (drv-&gt;<a class="code hl_variable" href="group__mci__interface__gr.html#a941fb6d191be477582c21d1f6757ab1f">AbortTransfer</a>() == <a class="code hl_define" href="group__execution__status.html#ga85752c5de59e8adeb001e35ff5be6be7">ARM_DRIVER_OK</a>) {</div>
<div class="line">      <span class="comment">// Transfer aborted</span></div>
<div class="line">      <span class="comment">// ...</span></div>
<div class="line">    }</div>
<div class="line">  }</div>
<div class="line">}</div>
<div class="line"> </div>
<div class="line"><span class="comment">/* Usage example: ARM_MCI_GetStatus -----------------------------------------*/</span></div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">void</span> check_transfer_status (<a class="code hl_struct" href="group__mci__interface__gr.html#structARM__DRIVER__MCI">ARM_DRIVER_MCI</a> *drv) {</div>
<div class="line">  <a class="code hl_struct" href="group__mci__interface__gr.html#structARM__MCI__STATUS">ARM_MCI_STATUS</a> drv_status;</div>
<div class="line"> </div>
<div class="line">  drv_status = drv-&gt;<a class="code hl_variable" href="group__mci__interface__gr.html#a8e6e71480a5ec1575b6471ce3d32117d">GetStatus</a>();</div>
<div class="line"> </div>
<div class="line">  <span class="keywordflow">if</span> (drv_status.<a class="code hl_variable" href="group__mci__interface__gr.html#a2655d3422b720097b091a28e8bbcea8f">transfer_active</a> == 1U) {</div>
<div class="line">    <span class="comment">// Data transfer is active</span></div>
<div class="line">  }</div>
<div class="line">  </div>
<div class="line">  <span class="keywordflow">if</span> (drv_status.<a class="code hl_variable" href="group__mci__interface__gr.html#a598ae4a196316d6dcb97d07fd337ecdd">transfer_timeout</a> == 1U) {</div>
<div class="line">    <span class="comment">// Data not received, timeout expired</span></div>
<div class="line">  }</div>
<div class="line">  </div>
<div class="line">  <span class="keywordflow">if</span> (drv_status.<a class="code hl_variable" href="group__mci__interface__gr.html#a21d4bc1a03e161bd33693619039a6afa">transfer_error</a> == 1U) {</div>
<div class="line">    <span class="comment">// Data transfer ended with error</span></div>
<div class="line">  }</div>
<div class="line">}</div>
<div class="line"> </div>
<div class="line"><span class="comment">/* Usage example: ARM_MCI_SignalEvent ---------------------------------------*/</span></div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">void</span> MCI_SignalEvent_Callback (uint32_t event) {</div>
<div class="line">  <span class="keywordflow">if</span> ((event &amp; <a class="code hl_define" href="group__mci__event__gr.html#gae2cf8ef238c092e94e96a01602f3a23c">ARM_MCI_EVENT_CARD_INSERTED</a>) != 0U) {</div>
<div class="line">    <span class="comment">// Memory card was inserted into socket</span></div>
<div class="line">  }</div>
<div class="line">  <span class="keywordflow">if</span> ((event &amp; <a class="code hl_define" href="group__mci__event__gr.html#ga92ba748f9324ec13898f10456f17c8cc">ARM_MCI_EVENT_CARD_REMOVED</a>) != 0U) {</div>
<div class="line">    <span class="comment">// Memory card was removed from socket</span></div>
<div class="line">  }</div>
<div class="line"> </div>
<div class="line">  <span class="keywordflow">if</span> ((event &amp; <a class="code hl_define" href="group__mci__event__gr.html#gae69356c75d55103d93ef91ac1bc02b49">ARM_MCI_EVENT_COMMAND_COMPLETE</a>) != 0U) {</div>
<div class="line">    <span class="comment">// Command was successfully sent to memory card</span></div>
<div class="line">  }</div>
<div class="line">  <span class="keywordflow">if</span> ((event &amp; <a class="code hl_define" href="group__mci__event__gr.html#gab79b3ab4dcd03c38df1e173fa903d822">ARM_MCI_EVENT_COMMAND_TIMEOUT</a>) != 0U) {</div>
<div class="line">    <span class="comment">// Command response was not received in time</span></div>
<div class="line">  }</div>
<div class="line">  <span class="keywordflow">if</span> ((event &amp; <a class="code hl_define" href="group__mci__event__gr.html#ga373aeb3eca0e4c6d159312488a130442">ARM_MCI_EVENT_COMMAND_ERROR</a>) != 0U) {</div>
<div class="line">    <span class="comment">// Command response was invalid</span></div>
<div class="line">  }</div>
<div class="line"> </div>
<div class="line">  <span class="keywordflow">if</span> ((event &amp; <a class="code hl_define" href="group__mci__event__gr.html#gabc3c468dedaed890683360f2c5c65bea">ARM_MCI_EVENT_TRANSFER_COMPLETE</a>) != 0U) {</div>
<div class="line">    <span class="comment">// Data successfully transferred from/to memory card</span></div>
<div class="line">  }</div>
<div class="line">  <span class="keywordflow">if</span> ((event &amp; <a class="code hl_define" href="group__mci__event__gr.html#ga614e7c7226adbaa8ec4165bf8b87ef27">ARM_MCI_EVENT_TRANSFER_TIMEOUT</a>) != 0U) {</div>
<div class="line">    <span class="comment">// Data not transferred from/to memory card, timeout expired</span></div>
<div class="line">  }</div>
<div class="line">  <span class="keywordflow">if</span> ((event &amp; <a class="code hl_define" href="group__mci__event__gr.html#ga5d2cee5ba6d0e40ad505983155706c29">ARM_MCI_EVENT_TRANSFER_ERROR</a>) != 0U) {</div>
<div class="line">    <span class="comment">// Data transfer ended with errors</span></div>
<div class="line">  }</div>
<div class="line">  </div>
<div class="line">  <span class="keywordflow">if</span> ((event &amp; <a class="code hl_define" href="group__mci__event__gr.html#ga75a050fdfe04e6816e96c938d6a6c197">ARM_MCI_EVENT_SDIO_INTERRUPT</a>) != 0U) {</div>
<div class="line">    <span class="comment">// SD I/O card sent interrupt request</span></div>
<div class="line">  }</div>
<div class="line">  </div>
<div class="line">  <span class="keywordflow">if</span> ((event &amp; <a class="code hl_define" href="group__mci__event__gr.html#ga8161f3960ddf2a3cdc3c4c83148c6099">ARM_MCI_EVENT_CCS</a>) != 0U) {</div>
<div class="line">    <span class="comment">// CE-ATA command completion signal received</span></div>
<div class="line">  }</div>
<div class="line">  <span class="keywordflow">if</span> ((event &amp; <a class="code hl_define" href="group__mci__event__gr.html#gafa8cbcd597a05c64901eeb777cc0b74f">ARM_MCI_EVENT_CCS_TIMEOUT</a>) != 0U) {</div>
<div class="line">    <span class="comment">// CE-ATA command completion signal wait timeout expired</span></div>
<div class="line">  }</div>
<div class="line">}</div>
<div class="ttc" id="aDriver__Common_8h_html_ga47d6d7c31f88f3b8ae4aaf9d8444afa5ab6f5becc85ebd51c3dd2524a95d2ca35"><div class="ttname"><a href="Driver__Common_8h.html#ga47d6d7c31f88f3b8ae4aaf9d8444afa5ab6f5becc85ebd51c3dd2524a95d2ca35">ARM_POWER_OFF</a></div><div class="ttdeci">@ ARM_POWER_OFF</div><div class="ttdoc">Power off: no operation possible.</div><div class="ttdef"><b>Definition:</b> Driver_Common.h:64</div></div>
<div class="ttc" id="aDriver__Common_8h_html_ga47d6d7c31f88f3b8ae4aaf9d8444afa5abed52b77a9ce4775570e44a842b1295e"><div class="ttname"><a href="Driver__Common_8h.html#ga47d6d7c31f88f3b8ae4aaf9d8444afa5abed52b77a9ce4775570e44a842b1295e">ARM_POWER_FULL</a></div><div class="ttdeci">@ ARM_POWER_FULL</div><div class="ttdoc">Power on: full operation at maximum performance.</div><div class="ttdef"><b>Definition:</b> Driver_Common.h:66</div></div>
<div class="ttc" id="aDriver__MCI_8h_html"><div class="ttname"><a href="Driver__MCI_8h.html">Driver_MCI.h</a></div></div>
<div class="ttc" id="agroup__execution__status_html_ga85752c5de59e8adeb001e35ff5be6be7"><div class="ttname"><a href="group__execution__status.html#ga85752c5de59e8adeb001e35ff5be6be7">ARM_DRIVER_OK</a></div><div class="ttdeci">#define ARM_DRIVER_OK</div><div class="ttdoc">Operation succeeded.</div></div>
<div class="ttc" id="agroup__mci__card__power__ctrls_html_ga565ecd36c8d0379fb4172da577cc540d"><div class="ttname"><a href="group__mci__card__power__ctrls.html#ga565ecd36c8d0379fb4172da577cc540d">ARM_MCI_POWER_VDD_3V3</a></div><div class="ttdeci">#define ARM_MCI_POWER_VDD_3V3</div><div class="ttdoc">VDD (VCC) = 3.3V.</div></div>
<div class="ttc" id="agroup__mci__event__gr_html_ga373aeb3eca0e4c6d159312488a130442"><div class="ttname"><a href="group__mci__event__gr.html#ga373aeb3eca0e4c6d159312488a130442">ARM_MCI_EVENT_COMMAND_ERROR</a></div><div class="ttdeci">#define ARM_MCI_EVENT_COMMAND_ERROR</div><div class="ttdoc">Command response error (CRC error or invalid response)</div></div>
<div class="ttc" id="agroup__mci__event__gr_html_ga5d2cee5ba6d0e40ad505983155706c29"><div class="ttname"><a href="group__mci__event__gr.html#ga5d2cee5ba6d0e40ad505983155706c29">ARM_MCI_EVENT_TRANSFER_ERROR</a></div><div class="ttdeci">#define ARM_MCI_EVENT_TRANSFER_ERROR</div><div class="ttdoc">Data transfer CRC failed.</div></div>
<div class="ttc" id="agroup__mci__event__gr_html_ga614e7c7226adbaa8ec4165bf8b87ef27"><div class="ttname"><a href="group__mci__event__gr.html#ga614e7c7226adbaa8ec4165bf8b87ef27">ARM_MCI_EVENT_TRANSFER_TIMEOUT</a></div><div class="ttdeci">#define ARM_MCI_EVENT_TRANSFER_TIMEOUT</div><div class="ttdoc">Data transfer timeout.</div></div>
<div class="ttc" id="agroup__mci__event__gr_html_ga75a050fdfe04e6816e96c938d6a6c197"><div class="ttname"><a href="group__mci__event__gr.html#ga75a050fdfe04e6816e96c938d6a6c197">ARM_MCI_EVENT_SDIO_INTERRUPT</a></div><div class="ttdeci">#define ARM_MCI_EVENT_SDIO_INTERRUPT</div><div class="ttdoc">SD I/O Interrupt.</div></div>
<div class="ttc" id="agroup__mci__event__gr_html_ga8161f3960ddf2a3cdc3c4c83148c6099"><div class="ttname"><a href="group__mci__event__gr.html#ga8161f3960ddf2a3cdc3c4c83148c6099">ARM_MCI_EVENT_CCS</a></div><div class="ttdeci">#define ARM_MCI_EVENT_CCS</div><div class="ttdoc">Command Completion Signal (CCS)</div></div>
<div class="ttc" id="agroup__mci__event__gr_html_ga92ba748f9324ec13898f10456f17c8cc"><div class="ttname"><a href="group__mci__event__gr.html#ga92ba748f9324ec13898f10456f17c8cc">ARM_MCI_EVENT_CARD_REMOVED</a></div><div class="ttdeci">#define ARM_MCI_EVENT_CARD_REMOVED</div><div class="ttdoc">Memory Card removed.</div></div>
<div class="ttc" id="agroup__mci__event__gr_html_gab79b3ab4dcd03c38df1e173fa903d822"><div class="ttname"><a href="group__mci__event__gr.html#gab79b3ab4dcd03c38df1e173fa903d822">ARM_MCI_EVENT_COMMAND_TIMEOUT</a></div><div class="ttdeci">#define ARM_MCI_EVENT_COMMAND_TIMEOUT</div><div class="ttdoc">Command timeout.</div></div>
<div class="ttc" id="agroup__mci__event__gr_html_gabc3c468dedaed890683360f2c5c65bea"><div class="ttname"><a href="group__mci__event__gr.html#gabc3c468dedaed890683360f2c5c65bea">ARM_MCI_EVENT_TRANSFER_COMPLETE</a></div><div class="ttdeci">#define ARM_MCI_EVENT_TRANSFER_COMPLETE</div><div class="ttdoc">Data transfer completed.</div></div>
<div class="ttc" id="agroup__mci__event__gr_html_gae2cf8ef238c092e94e96a01602f3a23c"><div class="ttname"><a href="group__mci__event__gr.html#gae2cf8ef238c092e94e96a01602f3a23c">ARM_MCI_EVENT_CARD_INSERTED</a></div><div class="ttdeci">#define ARM_MCI_EVENT_CARD_INSERTED</div><div class="ttdoc">Memory Card inserted.</div></div>
<div class="ttc" id="agroup__mci__event__gr_html_gae69356c75d55103d93ef91ac1bc02b49"><div class="ttname"><a href="group__mci__event__gr.html#gae69356c75d55103d93ef91ac1bc02b49">ARM_MCI_EVENT_COMMAND_COMPLETE</a></div><div class="ttdeci">#define ARM_MCI_EVENT_COMMAND_COMPLETE</div><div class="ttdoc">Command completed.</div></div>
<div class="ttc" id="agroup__mci__event__gr_html_gafa8cbcd597a05c64901eeb777cc0b74f"><div class="ttname"><a href="group__mci__event__gr.html#gafa8cbcd597a05c64901eeb777cc0b74f">ARM_MCI_EVENT_CCS_TIMEOUT</a></div><div class="ttdeci">#define ARM_MCI_EVENT_CCS_TIMEOUT</div><div class="ttdoc">Command Completion Signal (CCS) Timeout.</div></div>
<div class="ttc" id="agroup__mci__interface__gr_html_a21d4bc1a03e161bd33693619039a6afa"><div class="ttname"><a href="group__mci__interface__gr.html#a21d4bc1a03e161bd33693619039a6afa">ARM_MCI_STATUS::transfer_error</a></div><div class="ttdeci">uint32_t transfer_error</div><div class="ttdoc">Transfer error flag (cleared on start of next command)</div><div class="ttdef"><b>Definition:</b> Driver_MCI.h:183</div></div>
<div class="ttc" id="agroup__mci__interface__gr_html_a24ebae5c6011631f76027f9a16eaf5ce"><div class="ttname"><a href="group__mci__interface__gr.html#a24ebae5c6011631f76027f9a16eaf5ce">ARM_DRIVER_MCI::PowerControl</a></div><div class="ttdeci">int32_t(* PowerControl)(ARM_POWER_STATE state)</div><div class="ttdoc">Pointer to ARM_MCI_PowerControl : Control MCI Interface Power.</div><div class="ttdef"><b>Definition:</b> Driver_MCI.h:344</div></div>
<div class="ttc" id="agroup__mci__interface__gr_html_a2655d3422b720097b091a28e8bbcea8f"><div class="ttname"><a href="group__mci__interface__gr.html#a2655d3422b720097b091a28e8bbcea8f">ARM_MCI_STATUS::transfer_active</a></div><div class="ttdeci">uint32_t transfer_active</div><div class="ttdoc">Transfer active flag.</div><div class="ttdef"><b>Definition:</b> Driver_MCI.h:181</div></div>
<div class="ttc" id="agroup__mci__interface__gr_html_a414baec222a72be862e262f02b821dce"><div class="ttname"><a href="group__mci__interface__gr.html#a414baec222a72be862e262f02b821dce">ARM_MCI_CAPABILITIES::vdd</a></div><div class="ttdeci">uint32_t vdd</div><div class="ttdoc">Supports VDD Card Power Supply Control.</div><div class="ttdef"><b>Definition:</b> Driver_MCI.h:306</div></div>
<div class="ttc" id="agroup__mci__interface__gr_html_a598ae4a196316d6dcb97d07fd337ecdd"><div class="ttname"><a href="group__mci__interface__gr.html#a598ae4a196316d6dcb97d07fd337ecdd">ARM_MCI_STATUS::transfer_timeout</a></div><div class="ttdeci">uint32_t transfer_timeout</div><div class="ttdoc">Transfer timeout flag (cleared on start of next command)</div><div class="ttdef"><b>Definition:</b> Driver_MCI.h:182</div></div>
<div class="ttc" id="agroup__mci__interface__gr_html_a5ce2b3d7a3a07099bf07d1eb253e92e3"><div class="ttname"><a href="group__mci__interface__gr.html#a5ce2b3d7a3a07099bf07d1eb253e92e3">ARM_DRIVER_MCI::Uninitialize</a></div><div class="ttdeci">int32_t(* Uninitialize)(void)</div><div class="ttdoc">Pointer to ARM_MCI_Uninitialize : De-initialize MCI Interface.</div><div class="ttdef"><b>Definition:</b> Driver_MCI.h:343</div></div>
<div class="ttc" id="agroup__mci__interface__gr_html_a607f96af38f877b34a937427ebc675de"><div class="ttname"><a href="group__mci__interface__gr.html#a607f96af38f877b34a937427ebc675de">ARM_DRIVER_MCI::SendCommand</a></div><div class="ttdeci">int32_t(* SendCommand)(uint32_t cmd, uint32_t arg, uint32_t flags, uint32_t *response)</div><div class="ttdoc">Pointer to ARM_MCI_SendCommand : Send Command to card and get the response.</div><div class="ttdef"><b>Definition:</b> Driver_MCI.h:348</div></div>
<div class="ttc" id="agroup__mci__interface__gr_html_a85b30bcbe4c9747c19cce2000d5684d3"><div class="ttname"><a href="group__mci__interface__gr.html#a85b30bcbe4c9747c19cce2000d5684d3">ARM_DRIVER_MCI::Initialize</a></div><div class="ttdeci">int32_t(* Initialize)(ARM_MCI_SignalEvent_t cb_event)</div><div class="ttdoc">Pointer to ARM_MCI_Initialize : Initialize MCI Interface.</div><div class="ttdef"><b>Definition:</b> Driver_MCI.h:342</div></div>
<div class="ttc" id="agroup__mci__interface__gr_html_a8e6e71480a5ec1575b6471ce3d32117d"><div class="ttname"><a href="group__mci__interface__gr.html#a8e6e71480a5ec1575b6471ce3d32117d">ARM_DRIVER_MCI::GetStatus</a></div><div class="ttdeci">ARM_MCI_STATUS(* GetStatus)(void)</div><div class="ttdoc">Pointer to ARM_MCI_GetStatus : Get MCI status.</div><div class="ttdef"><b>Definition:</b> Driver_MCI.h:358</div></div>
<div class="ttc" id="agroup__mci__interface__gr_html_a941fb6d191be477582c21d1f6757ab1f"><div class="ttname"><a href="group__mci__interface__gr.html#a941fb6d191be477582c21d1f6757ab1f">ARM_DRIVER_MCI::AbortTransfer</a></div><div class="ttdeci">int32_t(* AbortTransfer)(void)</div><div class="ttdoc">Pointer to ARM_MCI_AbortTransfer : Abort current data transfer.</div><div class="ttdef"><b>Definition:</b> Driver_MCI.h:356</div></div>
<div class="ttc" id="agroup__mci__interface__gr_html_ab023e8ec9252d65026c21ee84b573890"><div class="ttname"><a href="group__mci__interface__gr.html#ab023e8ec9252d65026c21ee84b573890">ARM_DRIVER_MCI::ReadWP</a></div><div class="ttdeci">int32_t(* ReadWP)(void)</div><div class="ttdoc">Pointer to ARM_MCI_ReadWP : Read Write Protect (WP) state.</div><div class="ttdef"><b>Definition:</b> Driver_MCI.h:347</div></div>
<div class="ttc" id="agroup__mci__interface__gr_html_ac28f754289ae6d3783e7c18a965ee3f8"><div class="ttname"><a href="group__mci__interface__gr.html#ac28f754289ae6d3783e7c18a965ee3f8">ARM_DRIVER_MCI::SetupTransfer</a></div><div class="ttdeci">int32_t(* SetupTransfer)(uint8_t *data, uint32_t block_count, uint32_t block_size, uint32_t mode)</div><div class="ttdoc">Pointer to ARM_MCI_SetupTransfer : Setup data transfer operation.</div><div class="ttdef"><b>Definition:</b> Driver_MCI.h:352</div></div>
<div class="ttc" id="agroup__mci__interface__gr_html_ac5f226aab1d575a4d6c4eca71cdd4a5b"><div class="ttname"><a href="group__mci__interface__gr.html#ac5f226aab1d575a4d6c4eca71cdd4a5b">ARM_DRIVER_MCI::CardPower</a></div><div class="ttdeci">int32_t(* CardPower)(uint32_t voltage)</div><div class="ttdoc">Pointer to ARM_MCI_CardPower : Set card power supply voltage.</div><div class="ttdef"><b>Definition:</b> Driver_MCI.h:345</div></div>
<div class="ttc" id="agroup__mci__interface__gr_html_ae00aa7cf8f0c0c7e2225b3048cbded13"><div class="ttname"><a href="group__mci__interface__gr.html#ae00aa7cf8f0c0c7e2225b3048cbded13">ARM_DRIVER_MCI::ReadCD</a></div><div class="ttdeci">int32_t(* ReadCD)(void)</div><div class="ttdoc">Pointer to ARM_MCI_ReadCD : Read Card Detect (CD) state.</div><div class="ttdef"><b>Definition:</b> Driver_MCI.h:346</div></div>
<div class="ttc" id="agroup__mci__interface__gr_html_structARM__DRIVER__MCI"><div class="ttname"><a href="group__mci__interface__gr.html#structARM__DRIVER__MCI">ARM_DRIVER_MCI</a></div><div class="ttdoc">Access structure of the MCI Driver.</div><div class="ttdef"><b>Definition:</b> Driver_MCI.h:339</div></div>
<div class="ttc" id="agroup__mci__interface__gr_html_structARM__MCI__CAPABILITIES"><div class="ttname"><a href="group__mci__interface__gr.html#structARM__MCI__CAPABILITIES">ARM_MCI_CAPABILITIES</a></div><div class="ttdoc">MCI Driver Capabilities.</div><div class="ttdef"><b>Definition:</b> Driver_MCI.h:302</div></div>
<div class="ttc" id="agroup__mci__interface__gr_html_structARM__MCI__STATUS"><div class="ttname"><a href="group__mci__interface__gr.html#structARM__MCI__STATUS">ARM_MCI_STATUS</a></div><div class="ttdoc">MCI Status.</div><div class="ttdef"><b>Definition:</b> Driver_MCI.h:177</div></div>
<div class="ttc" id="agroup__mci__send__command__flags__ctrls_html_ga6ab3f4c1a2bf0fdb81fbcf7a5698f2de"><div class="ttname"><a href="group__mci__send__command__flags__ctrls.html#ga6ab3f4c1a2bf0fdb81fbcf7a5698f2de">ARM_MCI_RESPONSE_CRC</a></div><div class="ttdeci">#define ARM_MCI_RESPONSE_CRC</div><div class="ttdoc">Check CRC in response.</div></div>
<div class="ttc" id="agroup__mci__send__command__flags__ctrls_html_ga70934cef80884e8c75fb4eebf8452118"><div class="ttname"><a href="group__mci__send__command__flags__ctrls.html#ga70934cef80884e8c75fb4eebf8452118">ARM_MCI_RESPONSE_NONE</a></div><div class="ttdeci">#define ARM_MCI_RESPONSE_NONE</div><div class="ttdoc">No response expected (default)</div></div>
<div class="ttc" id="agroup__mci__send__command__flags__ctrls_html_ga81606bd94ce782e2c3764b913f929f60"><div class="ttname"><a href="group__mci__send__command__flags__ctrls.html#ga81606bd94ce782e2c3764b913f929f60">ARM_MCI_CARD_INITIALIZE</a></div><div class="ttdeci">#define ARM_MCI_CARD_INITIALIZE</div><div class="ttdoc">Execute Memory Card initialization sequence.</div></div>
<div class="ttc" id="agroup__mci__send__command__flags__ctrls_html_ga8aa566f69aa74ed416213df6ca3267bd"><div class="ttname"><a href="group__mci__send__command__flags__ctrls.html#ga8aa566f69aa74ed416213df6ca3267bd">ARM_MCI_TRANSFER_DATA</a></div><div class="ttdeci">#define ARM_MCI_TRANSFER_DATA</div><div class="ttdoc">Activate Data transfer.</div></div>
<div class="ttc" id="agroup__mci__send__command__flags__ctrls_html_gaa5ddf1cf772b234e3c247039effd0e7b"><div class="ttname"><a href="group__mci__send__command__flags__ctrls.html#gaa5ddf1cf772b234e3c247039effd0e7b">ARM_MCI_RESPONSE_SHORT</a></div><div class="ttdeci">#define ARM_MCI_RESPONSE_SHORT</div><div class="ttdoc">Short response (48-bit)</div></div>
<div class="ttc" id="agroup__mci__transfer__ctrls_html_ga4ced782e7c0c70d5f0edbddd1e48323b"><div class="ttname"><a href="group__mci__transfer__ctrls.html#ga4ced782e7c0c70d5f0edbddd1e48323b">ARM_MCI_TRANSFER_BLOCK</a></div><div class="ttdeci">#define ARM_MCI_TRANSFER_BLOCK</div><div class="ttdoc">Block Data transfer (default)</div></div>
<div class="ttc" id="agroup__mci__transfer__ctrls_html_gaa6f3be235a9dce5c66be8fe64f399846"><div class="ttname"><a href="group__mci__transfer__ctrls.html#gaa6f3be235a9dce5c66be8fe64f399846">ARM_MCI_TRANSFER_READ</a></div><div class="ttdeci">#define ARM_MCI_TRANSFER_READ</div><div class="ttdoc">Data Read Transfer (from MCI)</div></div>
</div><!-- fragment --> <hr/><h2 class="groupheader">Data Structure Documentation</h2>
<a name="structARM__DRIVER__MCI" id="structARM__DRIVER__MCI"></a>
<h2 class="memtitle"><span class="permalink"><a href="#structARM__DRIVER__MCI">&#9670;&#160;</a></span>ARM_DRIVER_MCI</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct ARM_DRIVER_MCI</td>
        </tr>
      </table>
</div><div class="memdoc">
<div class="textblock"><p>Access structure of the MCI Driver. </p>
<p>The functions of the MCI are accessed by function pointers exposed by this structure. Refer to <a class="el" href="theoryOperation.html#DriverFunctions">Common Driver Functions</a> for overview information.</p>
<p>Each instance of an MCI provides such an access structure. The instance is identified by a postfix number in the symbol name of the access structure, for example:</p><ul>
<li><b>Driver_MCI0</b> is the name of the access struct of the first instance (no. 0).</li>
<li><b>Driver_MCI1</b> is the name of the access struct of the second instance (no. 1).</li>
</ul>
<p>A configuration setting in the middleware allows connecting the middleware to a specific driver instance <b>Driver_MCI<em>n</em></b>. The default is <span class="XML-Token">0</span>, which connects a middleware to the first instance of a driver. </p>
</div><table class="memberdecls">
<tr><td colspan="2"><h3>Data Fields</h3></td></tr>
<tr class="memitem:a30afd9cb3113c037b5f1926f5ef93b59"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__common__drv__gr.html#structARM__DRIVER__VERSION">ARM_DRIVER_VERSION</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mci__interface__gr.html#a30afd9cb3113c037b5f1926f5ef93b59">GetVersion</a> )(void)</td></tr>
<tr class="memdesc:a30afd9cb3113c037b5f1926f5ef93b59"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__mci__interface__gr.html#ga3418183015dbf3025b94eebaedb00ab1">ARM_MCI_GetVersion</a> : Get driver version.  <br /></td></tr>
<tr class="separator:a30afd9cb3113c037b5f1926f5ef93b59"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afa1d379bd4972549e60e99b129284c43"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__mci__interface__gr.html#structARM__MCI__CAPABILITIES">ARM_MCI_CAPABILITIES</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mci__interface__gr.html#afa1d379bd4972549e60e99b129284c43">GetCapabilities</a> )(void)</td></tr>
<tr class="memdesc:afa1d379bd4972549e60e99b129284c43"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__mci__interface__gr.html#ga7e5a78b6e6409189833a0b72a0a3c48a">ARM_MCI_GetCapabilities</a> : Get driver capabilities.  <br /></td></tr>
<tr class="separator:afa1d379bd4972549e60e99b129284c43"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a85b30bcbe4c9747c19cce2000d5684d3"><td class="memItemLeft" align="right" valign="top">int32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mci__interface__gr.html#a85b30bcbe4c9747c19cce2000d5684d3">Initialize</a> )(<a class="el" href="group__mci__interface__gr.html#ga0d14651f6788c1ffd81544602565faf1">ARM_MCI_SignalEvent_t</a> cb_event)</td></tr>
<tr class="memdesc:a85b30bcbe4c9747c19cce2000d5684d3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__mci__interface__gr.html#ga6f34d4ab362e596ddaf23aac093268cf">ARM_MCI_Initialize</a> : Initialize MCI Interface.  <br /></td></tr>
<tr class="separator:a85b30bcbe4c9747c19cce2000d5684d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5ce2b3d7a3a07099bf07d1eb253e92e3"><td class="memItemLeft" align="right" valign="top">int32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mci__interface__gr.html#a5ce2b3d7a3a07099bf07d1eb253e92e3">Uninitialize</a> )(void)</td></tr>
<tr class="memdesc:a5ce2b3d7a3a07099bf07d1eb253e92e3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__mci__interface__gr.html#gaef8183e77797e74997551d03646d42c2">ARM_MCI_Uninitialize</a> : De-initialize MCI Interface.  <br /></td></tr>
<tr class="separator:a5ce2b3d7a3a07099bf07d1eb253e92e3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a24ebae5c6011631f76027f9a16eaf5ce"><td class="memItemLeft" align="right" valign="top">int32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mci__interface__gr.html#a24ebae5c6011631f76027f9a16eaf5ce">PowerControl</a> )(<a class="el" href="group__common__drv__gr.html#ga47d6d7c31f88f3b8ae4aaf9d8444afa5">ARM_POWER_STATE</a> state)</td></tr>
<tr class="memdesc:a24ebae5c6011631f76027f9a16eaf5ce"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__mci__interface__gr.html#ga19752749d04ed22dc91c4294645e0244">ARM_MCI_PowerControl</a> : Control MCI Interface Power.  <br /></td></tr>
<tr class="separator:a24ebae5c6011631f76027f9a16eaf5ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac5f226aab1d575a4d6c4eca71cdd4a5b"><td class="memItemLeft" align="right" valign="top">int32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mci__interface__gr.html#ac5f226aab1d575a4d6c4eca71cdd4a5b">CardPower</a> )(uint32_t voltage)</td></tr>
<tr class="memdesc:ac5f226aab1d575a4d6c4eca71cdd4a5b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__mci__interface__gr.html#gab161f80e0eda2815f3e0ebbba1314ff0">ARM_MCI_CardPower</a> : Set card power supply voltage.  <br /></td></tr>
<tr class="separator:ac5f226aab1d575a4d6c4eca71cdd4a5b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae00aa7cf8f0c0c7e2225b3048cbded13"><td class="memItemLeft" align="right" valign="top">int32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mci__interface__gr.html#ae00aa7cf8f0c0c7e2225b3048cbded13">ReadCD</a> )(void)</td></tr>
<tr class="memdesc:ae00aa7cf8f0c0c7e2225b3048cbded13"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__mci__interface__gr.html#ga012fca8f1ce5366fce14b708c771c635">ARM_MCI_ReadCD</a> : Read Card Detect (CD) state.  <br /></td></tr>
<tr class="separator:ae00aa7cf8f0c0c7e2225b3048cbded13"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab023e8ec9252d65026c21ee84b573890"><td class="memItemLeft" align="right" valign="top">int32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mci__interface__gr.html#ab023e8ec9252d65026c21ee84b573890">ReadWP</a> )(void)</td></tr>
<tr class="memdesc:ab023e8ec9252d65026c21ee84b573890"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__mci__interface__gr.html#ga3d70286918405ac81fa795c7d09dc6fd">ARM_MCI_ReadWP</a> : Read Write Protect (WP) state.  <br /></td></tr>
<tr class="separator:ab023e8ec9252d65026c21ee84b573890"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a607f96af38f877b34a937427ebc675de"><td class="memItemLeft" align="right" valign="top">int32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mci__interface__gr.html#a607f96af38f877b34a937427ebc675de">SendCommand</a> )(uint32_t cmd, uint32_t arg, uint32_t flags, uint32_t *response)</td></tr>
<tr class="memdesc:a607f96af38f877b34a937427ebc675de"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__mci__interface__gr.html#ga5a431da89feabc2b4bc0c27943dff6f2">ARM_MCI_SendCommand</a> : Send Command to card and get the response.  <br /></td></tr>
<tr class="separator:a607f96af38f877b34a937427ebc675de"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac28f754289ae6d3783e7c18a965ee3f8"><td class="memItemLeft" align="right" valign="top">int32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mci__interface__gr.html#ac28f754289ae6d3783e7c18a965ee3f8">SetupTransfer</a> )(uint8_t *data, uint32_t block_count, uint32_t block_size, uint32_t mode)</td></tr>
<tr class="memdesc:ac28f754289ae6d3783e7c18a965ee3f8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__mci__interface__gr.html#gaaec681bcd8e6811c5743e33ee0f35ed1">ARM_MCI_SetupTransfer</a> : Setup data transfer operation.  <br /></td></tr>
<tr class="separator:ac28f754289ae6d3783e7c18a965ee3f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a941fb6d191be477582c21d1f6757ab1f"><td class="memItemLeft" align="right" valign="top">int32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mci__interface__gr.html#a941fb6d191be477582c21d1f6757ab1f">AbortTransfer</a> )(void)</td></tr>
<tr class="memdesc:a941fb6d191be477582c21d1f6757ab1f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__mci__interface__gr.html#ga3dfcf7b7186b711f9b63a096be816fe5">ARM_MCI_AbortTransfer</a> : Abort current data transfer.  <br /></td></tr>
<tr class="separator:a941fb6d191be477582c21d1f6757ab1f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5e96d73d3a3c366aba50bf5304edb029"><td class="memItemLeft" align="right" valign="top">int32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mci__interface__gr.html#a5e96d73d3a3c366aba50bf5304edb029">Control</a> )(uint32_t control, uint32_t arg)</td></tr>
<tr class="memdesc:a5e96d73d3a3c366aba50bf5304edb029"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__mci__interface__gr.html#gaec0506a2aa4ae75cf6bc02528f36fe30">ARM_MCI_Control</a> : Control MCI Interface.  <br /></td></tr>
<tr class="separator:a5e96d73d3a3c366aba50bf5304edb029"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8e6e71480a5ec1575b6471ce3d32117d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__mci__interface__gr.html#structARM__MCI__STATUS">ARM_MCI_STATUS</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mci__interface__gr.html#a8e6e71480a5ec1575b6471ce3d32117d">GetStatus</a> )(void)</td></tr>
<tr class="memdesc:a8e6e71480a5ec1575b6471ce3d32117d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__mci__interface__gr.html#ga8d61aa42ce78d1864fa928c1f273cbd9">ARM_MCI_GetStatus</a> : Get MCI status.  <br /></td></tr>
<tr class="separator:a8e6e71480a5ec1575b6471ce3d32117d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h4 class="groupheader">Field Documentation</h4>
<a id="a30afd9cb3113c037b5f1926f5ef93b59" name="a30afd9cb3113c037b5f1926f5ef93b59"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a30afd9cb3113c037b5f1926f5ef93b59">&#9670;&#160;</a></span>GetVersion</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__common__drv__gr.html#structARM__DRIVER__VERSION">ARM_DRIVER_VERSION</a>(* GetVersion) (void)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__mci__interface__gr.html#ga3418183015dbf3025b94eebaedb00ab1">ARM_MCI_GetVersion</a> : Get driver version. </p>

</div>
</div>
<a id="afa1d379bd4972549e60e99b129284c43" name="afa1d379bd4972549e60e99b129284c43"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afa1d379bd4972549e60e99b129284c43">&#9670;&#160;</a></span>GetCapabilities</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__mci__interface__gr.html#structARM__MCI__CAPABILITIES">ARM_MCI_CAPABILITIES</a>(* GetCapabilities) (void)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__mci__interface__gr.html#ga7e5a78b6e6409189833a0b72a0a3c48a">ARM_MCI_GetCapabilities</a> : Get driver capabilities. </p>

</div>
</div>
<a id="a85b30bcbe4c9747c19cce2000d5684d3" name="a85b30bcbe4c9747c19cce2000d5684d3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a85b30bcbe4c9747c19cce2000d5684d3">&#9670;&#160;</a></span>Initialize</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t(* Initialize) (<a class="el" href="group__mci__interface__gr.html#ga0d14651f6788c1ffd81544602565faf1">ARM_MCI_SignalEvent_t</a> cb_event)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__mci__interface__gr.html#ga6f34d4ab362e596ddaf23aac093268cf">ARM_MCI_Initialize</a> : Initialize MCI Interface. </p>

</div>
</div>
<a id="a5ce2b3d7a3a07099bf07d1eb253e92e3" name="a5ce2b3d7a3a07099bf07d1eb253e92e3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5ce2b3d7a3a07099bf07d1eb253e92e3">&#9670;&#160;</a></span>Uninitialize</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t(* Uninitialize) (void)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__mci__interface__gr.html#gaef8183e77797e74997551d03646d42c2">ARM_MCI_Uninitialize</a> : De-initialize MCI Interface. </p>

</div>
</div>
<a id="a24ebae5c6011631f76027f9a16eaf5ce" name="a24ebae5c6011631f76027f9a16eaf5ce"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a24ebae5c6011631f76027f9a16eaf5ce">&#9670;&#160;</a></span>PowerControl</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t(* PowerControl) (<a class="el" href="group__common__drv__gr.html#ga47d6d7c31f88f3b8ae4aaf9d8444afa5">ARM_POWER_STATE</a> state)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__mci__interface__gr.html#ga19752749d04ed22dc91c4294645e0244">ARM_MCI_PowerControl</a> : Control MCI Interface Power. </p>

</div>
</div>
<a id="ac5f226aab1d575a4d6c4eca71cdd4a5b" name="ac5f226aab1d575a4d6c4eca71cdd4a5b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac5f226aab1d575a4d6c4eca71cdd4a5b">&#9670;&#160;</a></span>CardPower</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t(* CardPower) (uint32_t voltage)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__mci__interface__gr.html#gab161f80e0eda2815f3e0ebbba1314ff0">ARM_MCI_CardPower</a> : Set card power supply voltage. </p>

</div>
</div>
<a id="ae00aa7cf8f0c0c7e2225b3048cbded13" name="ae00aa7cf8f0c0c7e2225b3048cbded13"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae00aa7cf8f0c0c7e2225b3048cbded13">&#9670;&#160;</a></span>ReadCD</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t(* ReadCD) (void)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__mci__interface__gr.html#ga012fca8f1ce5366fce14b708c771c635">ARM_MCI_ReadCD</a> : Read Card Detect (CD) state. </p>

</div>
</div>
<a id="ab023e8ec9252d65026c21ee84b573890" name="ab023e8ec9252d65026c21ee84b573890"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab023e8ec9252d65026c21ee84b573890">&#9670;&#160;</a></span>ReadWP</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t(* ReadWP) (void)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__mci__interface__gr.html#ga3d70286918405ac81fa795c7d09dc6fd">ARM_MCI_ReadWP</a> : Read Write Protect (WP) state. </p>

</div>
</div>
<a id="a607f96af38f877b34a937427ebc675de" name="a607f96af38f877b34a937427ebc675de"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a607f96af38f877b34a937427ebc675de">&#9670;&#160;</a></span>SendCommand</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t(* SendCommand) (uint32_t cmd, uint32_t arg, uint32_t flags, uint32_t *response)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__mci__interface__gr.html#ga5a431da89feabc2b4bc0c27943dff6f2">ARM_MCI_SendCommand</a> : Send Command to card and get the response. </p>

</div>
</div>
<a id="ac28f754289ae6d3783e7c18a965ee3f8" name="ac28f754289ae6d3783e7c18a965ee3f8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac28f754289ae6d3783e7c18a965ee3f8">&#9670;&#160;</a></span>SetupTransfer</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t(* SetupTransfer) (uint8_t *data, uint32_t block_count, uint32_t block_size, uint32_t mode)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__mci__interface__gr.html#gaaec681bcd8e6811c5743e33ee0f35ed1">ARM_MCI_SetupTransfer</a> : Setup data transfer operation. </p>

</div>
</div>
<a id="a941fb6d191be477582c21d1f6757ab1f" name="a941fb6d191be477582c21d1f6757ab1f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a941fb6d191be477582c21d1f6757ab1f">&#9670;&#160;</a></span>AbortTransfer</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t(* AbortTransfer) (void)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__mci__interface__gr.html#ga3dfcf7b7186b711f9b63a096be816fe5">ARM_MCI_AbortTransfer</a> : Abort current data transfer. </p>

</div>
</div>
<a id="a5e96d73d3a3c366aba50bf5304edb029" name="a5e96d73d3a3c366aba50bf5304edb029"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5e96d73d3a3c366aba50bf5304edb029">&#9670;&#160;</a></span>Control</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t(* Control) (uint32_t control, uint32_t arg)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__mci__interface__gr.html#gaec0506a2aa4ae75cf6bc02528f36fe30">ARM_MCI_Control</a> : Control MCI Interface. </p>

</div>
</div>
<a id="a8e6e71480a5ec1575b6471ce3d32117d" name="a8e6e71480a5ec1575b6471ce3d32117d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8e6e71480a5ec1575b6471ce3d32117d">&#9670;&#160;</a></span>GetStatus</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__mci__interface__gr.html#structARM__MCI__STATUS">ARM_MCI_STATUS</a>(* GetStatus) (void)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__mci__interface__gr.html#ga8d61aa42ce78d1864fa928c1f273cbd9">ARM_MCI_GetStatus</a> : Get MCI status. </p>

</div>
</div>

</div>
</div>
<a name="structARM__MCI__CAPABILITIES" id="structARM__MCI__CAPABILITIES"></a>
<h2 class="memtitle"><span class="permalink"><a href="#structARM__MCI__CAPABILITIES">&#9670;&#160;</a></span>ARM_MCI_CAPABILITIES</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct ARM_MCI_CAPABILITIES</td>
        </tr>
      </table>
</div><div class="memdoc">
<div class="textblock"><p>MCI Driver Capabilities. </p>
<p>A MCI driver can be implemented with different capabilities. <br  />
 The data fields of this struct encode the capabilities implemented by this driver.</p>
<p><b>Returned by:</b></p><ul>
<li><a class="el" href="group__mci__interface__gr.html#ga7e5a78b6e6409189833a0b72a0a3c48a">ARM_MCI_GetCapabilities</a> </li>
</ul>
</div><table class="fieldtable">
<tr><th colspan="3">Data Fields</th></tr>
<tr><td class="fieldtype">
<a id="af47e73979b028c86c7c1fbe39b095140" name="af47e73979b028c86c7c1fbe39b095140"></a>uint32_t</td>
<td class="fieldname">
cd_state: 1</td>
<td class="fielddoc">
Card Detect State available. </td></tr>
<tr><td class="fieldtype">
<a id="abcabfa504d3226c723d9bf5debe2f164" name="abcabfa504d3226c723d9bf5debe2f164"></a>uint32_t</td>
<td class="fieldname">
cd_event: 1</td>
<td class="fielddoc">
Signal Card Detect change event. </td></tr>
<tr><td class="fieldtype">
<a id="a02df0162d3a653c36158a7b6a76f6175" name="a02df0162d3a653c36158a7b6a76f6175"></a>uint32_t</td>
<td class="fieldname">
wp_state: 1</td>
<td class="fielddoc">
Write Protect State available. </td></tr>
<tr><td class="fieldtype">
<a id="a414baec222a72be862e262f02b821dce" name="a414baec222a72be862e262f02b821dce"></a>uint32_t</td>
<td class="fieldname">
vdd: 1</td>
<td class="fielddoc">
Supports VDD Card Power Supply Control. </td></tr>
<tr><td class="fieldtype">
<a id="abeb0330f882ebed8cabde782652233dd" name="abeb0330f882ebed8cabde782652233dd"></a>uint32_t</td>
<td class="fieldname">
vdd_1v8: 1</td>
<td class="fielddoc">
Supports 1.8 VDD Card Power Supply. </td></tr>
<tr><td class="fieldtype">
<a id="ab1cdfce6eb051bed7b904e0fd1719afa" name="ab1cdfce6eb051bed7b904e0fd1719afa"></a>uint32_t</td>
<td class="fieldname">
vccq: 1</td>
<td class="fielddoc">
Supports VCCQ Card Power Supply Control (eMMC) </td></tr>
<tr><td class="fieldtype">
<a id="a1896a7548bb6fab285f23cc0d0b23d7d" name="a1896a7548bb6fab285f23cc0d0b23d7d"></a>uint32_t</td>
<td class="fieldname">
vccq_1v8: 1</td>
<td class="fielddoc">
Supports 1.8 VCCQ Card Power Supply (eMMC) </td></tr>
<tr><td class="fieldtype">
<a id="af4f95215005e38700ef527714932b361" name="af4f95215005e38700ef527714932b361"></a>uint32_t</td>
<td class="fieldname">
vccq_1v2: 1</td>
<td class="fielddoc">
Supports 1.2 VCCQ Card Power Supply (eMMC) </td></tr>
<tr><td class="fieldtype">
<a id="a950669a8c88b49c8da4c56163b45a79d" name="a950669a8c88b49c8da4c56163b45a79d"></a>uint32_t</td>
<td class="fieldname">
data_width_4: 1</td>
<td class="fielddoc">
Supports 4-bit data. </td></tr>
<tr><td class="fieldtype">
<a id="a808703d6c70a501464e156e55f5cabd2" name="a808703d6c70a501464e156e55f5cabd2"></a>uint32_t</td>
<td class="fieldname">
data_width_8: 1</td>
<td class="fielddoc">
Supports 8-bit data. </td></tr>
<tr><td class="fieldtype">
<a id="abb1a604b0ee4f7e3510409747890e41e" name="abb1a604b0ee4f7e3510409747890e41e"></a>uint32_t</td>
<td class="fieldname">
data_width_4_ddr: 1</td>
<td class="fielddoc">
Supports 4-bit data, DDR (Dual Data Rate) - MMC only. </td></tr>
<tr><td class="fieldtype">
<a id="acd5f6dce3a548d12c292e8cd17e4e9e2" name="acd5f6dce3a548d12c292e8cd17e4e9e2"></a>uint32_t</td>
<td class="fieldname">
data_width_8_ddr: 1</td>
<td class="fielddoc">
Supports 8-bit data, DDR (Dual Data Rate) - MMC only. </td></tr>
<tr><td class="fieldtype">
<a id="a83ecf7d4472c55362750ef72d8f8f47d" name="a83ecf7d4472c55362750ef72d8f8f47d"></a>uint32_t</td>
<td class="fieldname">
high_speed: 1</td>
<td class="fielddoc">
Supports SD/MMC High Speed Mode. </td></tr>
<tr><td class="fieldtype">
<a id="a084188480d589cdc8d3e164b9f41bea9" name="a084188480d589cdc8d3e164b9f41bea9"></a>uint32_t</td>
<td class="fieldname">
uhs_signaling: 1</td>
<td class="fielddoc">
Supports SD UHS-I (Ultra High Speed) 1.8V signaling. </td></tr>
<tr><td class="fieldtype">
<a id="a617bf7fb73b49a20398b90098ecc3ec0" name="a617bf7fb73b49a20398b90098ecc3ec0"></a>uint32_t</td>
<td class="fieldname">
uhs_tuning: 1</td>
<td class="fielddoc">
Supports SD UHS-I tuning. </td></tr>
<tr><td class="fieldtype">
<a id="a5c3dcb2f8aa6f65408d9a6741abb7b3e" name="a5c3dcb2f8aa6f65408d9a6741abb7b3e"></a>uint32_t</td>
<td class="fieldname">
uhs_sdr50: 1</td>
<td class="fielddoc">
Supports SD UHS-I SDR50 (Single Data Rate) up to 50MB/s. </td></tr>
<tr><td class="fieldtype">
<a id="ae07ceef1800252495a79f225142740e7" name="ae07ceef1800252495a79f225142740e7"></a>uint32_t</td>
<td class="fieldname">
uhs_sdr104: 1</td>
<td class="fielddoc">
Supports SD UHS-I SDR104 (Single Data Rate) up to 104MB/s. </td></tr>
<tr><td class="fieldtype">
<a id="a1ee73c19020d5f1bedf7c013d0e5f730" name="a1ee73c19020d5f1bedf7c013d0e5f730"></a>uint32_t</td>
<td class="fieldname">
uhs_ddr50: 1</td>
<td class="fielddoc">
Supports SD UHS-I DDR50 (Dual Data Rate) up to 50MB/s. </td></tr>
<tr><td class="fieldtype">
<a id="afe5de4fdc6657aa19fa87577a8d460e5" name="afe5de4fdc6657aa19fa87577a8d460e5"></a>uint32_t</td>
<td class="fieldname">
uhs_driver_type_a: 1</td>
<td class="fielddoc">
Supports SD UHS-I Driver Type A. </td></tr>
<tr><td class="fieldtype">
<a id="a3c3df9641e7216dd20d3bc395dc4948f" name="a3c3df9641e7216dd20d3bc395dc4948f"></a>uint32_t</td>
<td class="fieldname">
uhs_driver_type_c: 1</td>
<td class="fielddoc">
Supports SD UHS-I Driver Type C. </td></tr>
<tr><td class="fieldtype">
<a id="a639bebbcb9a3a743f4f232fec82e2bfc" name="a639bebbcb9a3a743f4f232fec82e2bfc"></a>uint32_t</td>
<td class="fieldname">
uhs_driver_type_d: 1</td>
<td class="fielddoc">
Supports SD UHS-I Driver Type D. </td></tr>
<tr><td class="fieldtype">
<a id="a61e2a440b27d7d22c866ad4427f4b825" name="a61e2a440b27d7d22c866ad4427f4b825"></a>uint32_t</td>
<td class="fieldname">
sdio_interrupt: 1</td>
<td class="fielddoc">
Supports SD I/O Interrupt. </td></tr>
<tr><td class="fieldtype">
<a id="a5e38e4ee9cebcc99904e287adc8e6217" name="a5e38e4ee9cebcc99904e287adc8e6217"></a>uint32_t</td>
<td class="fieldname">
read_wait: 1</td>
<td class="fielddoc">
Supports Read Wait (SD I/O) </td></tr>
<tr><td class="fieldtype">
<a id="abb03f0187e4658f417b5a24cac33eed9" name="abb03f0187e4658f417b5a24cac33eed9"></a>uint32_t</td>
<td class="fieldname">
suspend_resume: 1</td>
<td class="fielddoc">
Supports Suspend/Resume (SD I/O) </td></tr>
<tr><td class="fieldtype">
<a id="a3303194ea68bd1094841d4f958f6dbbf" name="a3303194ea68bd1094841d4f958f6dbbf"></a>uint32_t</td>
<td class="fieldname">
mmc_interrupt: 1</td>
<td class="fielddoc">
Supports MMC Interrupt. </td></tr>
<tr><td class="fieldtype">
<a id="a072a194948489d4dbd2409b94fdca56b" name="a072a194948489d4dbd2409b94fdca56b"></a>uint32_t</td>
<td class="fieldname">
mmc_boot: 1</td>
<td class="fielddoc">
Supports MMC Boot. </td></tr>
<tr><td class="fieldtype">
<a id="a2e8bd27f2c5c3093c4fec557890b97d4" name="a2e8bd27f2c5c3093c4fec557890b97d4"></a>uint32_t</td>
<td class="fieldname">
rst_n: 1</td>
<td class="fielddoc">
Supports RST_n Pin Control (eMMC) </td></tr>
<tr><td class="fieldtype">
<a id="a13c956ba993083f1e59379968e2badbe" name="a13c956ba993083f1e59379968e2badbe"></a>uint32_t</td>
<td class="fieldname">
ccs: 1</td>
<td class="fielddoc">
Supports Command Completion Signal (CCS) for CE-ATA. </td></tr>
<tr><td class="fieldtype">
<a id="a9739c230a13b46482feb5475d257e482" name="a9739c230a13b46482feb5475d257e482"></a>uint32_t</td>
<td class="fieldname">
ccs_timeout: 1</td>
<td class="fielddoc">
Supports Command Completion Signal (CCS) timeout for CE-ATA. </td></tr>
<tr><td class="fieldtype">
<a id="aa43c4c21b173ada1b6b7568956f0d650" name="aa43c4c21b173ada1b6b7568956f0d650"></a>uint32_t</td>
<td class="fieldname">
reserved: 3</td>
<td class="fielddoc">
Reserved (must be zero) </td></tr>
</table>

</div>
</div>
<a name="structARM__MCI__STATUS" id="structARM__MCI__STATUS"></a>
<h2 class="memtitle"><span class="permalink"><a href="#structARM__MCI__STATUS">&#9670;&#160;</a></span>ARM_MCI_STATUS</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct ARM_MCI_STATUS</td>
        </tr>
      </table>
</div><div class="memdoc">
<div class="textblock"><p>MCI Status. </p>
<p>Structure with information about the status of the MCI.</p>
<p><b>Returned by:</b></p><ul>
<li><a class="el" href="group__mci__interface__gr.html#ga8d61aa42ce78d1864fa928c1f273cbd9">ARM_MCI_GetStatus</a> </li>
</ul>
</div><table class="fieldtable">
<tr><th colspan="3">Data Fields</th></tr>
<tr><td class="fieldtype">
<a id="aa22ef7c7597e90835bd67d5795ba757e" name="aa22ef7c7597e90835bd67d5795ba757e"></a>uint32_t</td>
<td class="fieldname">
command_active: 1</td>
<td class="fielddoc">
Command active flag. </td></tr>
<tr><td class="fieldtype">
<a id="a56e426979c3872254c156e9ae7eead5b" name="a56e426979c3872254c156e9ae7eead5b"></a>uint32_t</td>
<td class="fieldname">
command_timeout: 1</td>
<td class="fielddoc">
Command timeout flag (cleared on start of next command) </td></tr>
<tr><td class="fieldtype">
<a id="afca11cd2ce661c67455a6d75328848cc" name="afca11cd2ce661c67455a6d75328848cc"></a>uint32_t</td>
<td class="fieldname">
command_error: 1</td>
<td class="fielddoc">
Command error flag (cleared on start of next command) </td></tr>
<tr><td class="fieldtype">
<a id="a2655d3422b720097b091a28e8bbcea8f" name="a2655d3422b720097b091a28e8bbcea8f"></a>uint32_t</td>
<td class="fieldname">
transfer_active: 1</td>
<td class="fielddoc">
Transfer active flag. </td></tr>
<tr><td class="fieldtype">
<a id="a598ae4a196316d6dcb97d07fd337ecdd" name="a598ae4a196316d6dcb97d07fd337ecdd"></a>uint32_t</td>
<td class="fieldname">
transfer_timeout: 1</td>
<td class="fielddoc">
Transfer timeout flag (cleared on start of next command) </td></tr>
<tr><td class="fieldtype">
<a id="a21d4bc1a03e161bd33693619039a6afa" name="a21d4bc1a03e161bd33693619039a6afa"></a>uint32_t</td>
<td class="fieldname">
transfer_error: 1</td>
<td class="fielddoc">
Transfer error flag (cleared on start of next command) </td></tr>
<tr><td class="fieldtype">
<a id="a61e2a440b27d7d22c866ad4427f4b825" name="a61e2a440b27d7d22c866ad4427f4b825"></a>uint32_t</td>
<td class="fieldname">
sdio_interrupt: 1</td>
<td class="fielddoc">
SD I/O Interrupt flag (cleared on start of monitoring) </td></tr>
<tr><td class="fieldtype">
<a id="a13c956ba993083f1e59379968e2badbe" name="a13c956ba993083f1e59379968e2badbe"></a>uint32_t</td>
<td class="fieldname">
ccs: 1</td>
<td class="fielddoc">
CCS flag (cleared on start of next command) </td></tr>
<tr><td class="fieldtype">
<a id="aa43c4c21b173ada1b6b7568956f0d650" name="aa43c4c21b173ada1b6b7568956f0d650"></a>uint32_t</td>
<td class="fieldname">
reserved: 24</td>
<td class="fielddoc">
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Typedef Documentation</h2>
<a id="ga0d14651f6788c1ffd81544602565faf1" name="ga0d14651f6788c1ffd81544602565faf1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0d14651f6788c1ffd81544602565faf1">&#9670;&#160;</a></span>ARM_MCI_SignalEvent_t</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ARM_MCI_SignalEvent_t</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__mci__interface__gr.html#gaac2dbd1c1a98436938c5d0d6248cb700">ARM_MCI_SignalEvent</a> : Signal MCI Card Event. </p>
<p>Provides the typedef for the callback function <a class="el" href="group__mci__interface__gr.html#gaac2dbd1c1a98436938c5d0d6248cb700">ARM_MCI_SignalEvent</a>.</p>
<p><b>Parameter for:</b></p><ul>
<li><a class="el" href="group__mci__interface__gr.html#ga6f34d4ab362e596ddaf23aac093268cf">ARM_MCI_Initialize</a> </li>
</ul>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga3418183015dbf3025b94eebaedb00ab1" name="ga3418183015dbf3025b94eebaedb00ab1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3418183015dbf3025b94eebaedb00ab1">&#9670;&#160;</a></span>ARM_MCI_GetVersion()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__common__drv__gr.html#structARM__DRIVER__VERSION">ARM_DRIVER_VERSION</a> ARM_MCI_GetVersion </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get driver version. </p>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__common__drv__gr.html#structARM__DRIVER__VERSION">ARM_DRIVER_VERSION</a></dd></dl>
<p>The function <b>ARM_MCI_GetVersion</b> returns version information of the driver implementation in <a class="el" href="group__common__drv__gr.html#structARM__DRIVER__VERSION">ARM_DRIVER_VERSION</a></p><ul>
<li>API version is the version of the CMSIS-Driver specification used to implement this driver.</li>
<li>Driver version is source code version of the actual driver implementation.</li>
</ul>
<p>Example: </p><div class="fragment"><div class="line"><span class="keyword">extern</span> <a class="code hl_struct" href="group__mci__interface__gr.html#structARM__DRIVER__MCI">ARM_DRIVER_MCI</a> Driver_MCI0;</div>
<div class="line"><a class="code hl_struct" href="group__mci__interface__gr.html#structARM__DRIVER__MCI">ARM_DRIVER_MCI</a> *drv_info;</div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">void</span> setup_mci (<span class="keywordtype">void</span>)  {</div>
<div class="line">  <a class="code hl_struct" href="group__common__drv__gr.html#structARM__DRIVER__VERSION">ARM_DRIVER_VERSION</a>  version;</div>
<div class="line"> </div>
<div class="line">  drv_info = &amp;Driver_MCI0;</div>
<div class="line">  version = drv_info-&gt;<a class="code hl_variable" href="group__mci__interface__gr.html#a30afd9cb3113c037b5f1926f5ef93b59">GetVersion</a> ();</div>
<div class="line">  <span class="keywordflow">if</span> (version.<a class="code hl_variable" href="group__common__drv__gr.html#ad180da20fbde1d3dafc074af87c19540">api</a> &lt; 0x10A)   {      <span class="comment">// requires at minimum API version 1.10 or higher</span></div>
<div class="line">    <span class="comment">// error handling</span></div>
<div class="line">    <span class="keywordflow">return</span>;</div>
<div class="line">  }</div>
<div class="line">}</div>
<div class="ttc" id="agroup__common__drv__gr_html_ad180da20fbde1d3dafc074af87c19540"><div class="ttname"><a href="group__common__drv__gr.html#ad180da20fbde1d3dafc074af87c19540">ARM_DRIVER_VERSION::api</a></div><div class="ttdeci">uint16_t api</div><div class="ttdoc">API version.</div><div class="ttdef"><b>Definition:</b> Driver_Common.h:47</div></div>
<div class="ttc" id="agroup__common__drv__gr_html_structARM__DRIVER__VERSION"><div class="ttname"><a href="group__common__drv__gr.html#structARM__DRIVER__VERSION">ARM_DRIVER_VERSION</a></div><div class="ttdoc">Driver Version.</div><div class="ttdef"><b>Definition:</b> Driver_Common.h:46</div></div>
<div class="ttc" id="agroup__mci__interface__gr_html_a30afd9cb3113c037b5f1926f5ef93b59"><div class="ttname"><a href="group__mci__interface__gr.html#a30afd9cb3113c037b5f1926f5ef93b59">ARM_DRIVER_MCI::GetVersion</a></div><div class="ttdeci">ARM_DRIVER_VERSION(* GetVersion)(void)</div><div class="ttdoc">Pointer to ARM_MCI_GetVersion : Get driver version.</div><div class="ttdef"><b>Definition:</b> Driver_MCI.h:340</div></div>
</div><!-- fragment --> 
</div>
</div>
<a id="ga7e5a78b6e6409189833a0b72a0a3c48a" name="ga7e5a78b6e6409189833a0b72a0a3c48a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7e5a78b6e6409189833a0b72a0a3c48a">&#9670;&#160;</a></span>ARM_MCI_GetCapabilities()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__mci__interface__gr.html#structARM__MCI__CAPABILITIES">ARM_MCI_CAPABILITIES</a> ARM_MCI_GetCapabilities </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get driver capabilities. </p>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__mci__interface__gr.html#structARM__MCI__CAPABILITIES">ARM_MCI_CAPABILITIES</a></dd></dl>
<p>The function <b>ARM_MCI_GetCapabilities</b> returns information about capabilities in this driver implementation. The data fields of the structure <a class="el" href="group__mci__interface__gr.html#structARM__MCI__CAPABILITIES">ARM_MCI_CAPABILITIES</a> encode various capabilities, for example supported bus modes ...</p>
<p>Example: </p><div class="fragment"><div class="line"><span class="keyword">extern</span> <a class="code hl_struct" href="group__mci__interface__gr.html#structARM__DRIVER__MCI">ARM_DRIVER_MCI</a> Driver_MCI0;</div>
<div class="line"><a class="code hl_struct" href="group__mci__interface__gr.html#structARM__DRIVER__MCI">ARM_DRIVER_MCI</a> *drv_info;</div>
<div class="line">  </div>
<div class="line"><span class="keywordtype">void</span> read_capabilities (<span class="keywordtype">void</span>)  {</div>
<div class="line">  <a class="code hl_struct" href="group__mci__interface__gr.html#structARM__MCI__CAPABILITIES">ARM_MCI_CAPABILITIES</a> drv_capabilities;</div>
<div class="line"> </div>
<div class="line">  drv_info = &amp;Driver_MCI0;  </div>
<div class="line">  drv_capabilities = drv_info-&gt;<a class="code hl_variable" href="group__mci__interface__gr.html#afa1d379bd4972549e60e99b129284c43">GetCapabilities</a> ();</div>
<div class="line">  <span class="comment">// interrogate capabilities</span></div>
<div class="line"> </div>
<div class="line">}</div>
<div class="ttc" id="agroup__mci__interface__gr_html_afa1d379bd4972549e60e99b129284c43"><div class="ttname"><a href="group__mci__interface__gr.html#afa1d379bd4972549e60e99b129284c43">ARM_DRIVER_MCI::GetCapabilities</a></div><div class="ttdeci">ARM_MCI_CAPABILITIES(* GetCapabilities)(void)</div><div class="ttdoc">Pointer to ARM_MCI_GetCapabilities : Get driver capabilities.</div><div class="ttdef"><b>Definition:</b> Driver_MCI.h:341</div></div>
</div><!-- fragment --> 
</div>
</div>
<a id="ga6f34d4ab362e596ddaf23aac093268cf" name="ga6f34d4ab362e596ddaf23aac093268cf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga6f34d4ab362e596ddaf23aac093268cf">&#9670;&#160;</a></span>ARM_MCI_Initialize()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ARM_MCI_Initialize </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__mci__interface__gr.html#ga0d14651f6788c1ffd81544602565faf1">ARM_MCI_SignalEvent_t</a>&#160;</td>
          <td class="paramname"><em>cb_event</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize the Memory Card Interface. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">cb_event</td><td>Pointer to <a class="el" href="group__mci__interface__gr.html#gaac2dbd1c1a98436938c5d0d6248cb700">ARM_MCI_SignalEvent</a> </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__execution__status.html">Status Error Codes</a></dd></dl>
<p>The function <b>ARM_MCI_Initialize</b> initializes the MCI interface. It is called when the middleware component starts operation.</p>
<p>The function performs the following operations:</p><ul>
<li>Initializes the resources needed for the MCI interface.</li>
<li>Registers the <a class="el" href="group__mci__interface__gr.html#gaac2dbd1c1a98436938c5d0d6248cb700">ARM_MCI_SignalEvent</a> callback function.</li>
</ul>
<p>The parameter <em>cb_event</em> is a pointer to the <a class="el" href="group__mci__interface__gr.html#gaac2dbd1c1a98436938c5d0d6248cb700">ARM_MCI_SignalEvent</a> callback function; use a NULL pointer when no callback signals are required.</p>
<p><b>Example:</b> </p><ul>
<li>see <a class="el" href="group__mci__interface__gr.html">MCI Interface</a> - Driver Functions </li>
</ul>

</div>
</div>
<a id="gaef8183e77797e74997551d03646d42c2" name="gaef8183e77797e74997551d03646d42c2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaef8183e77797e74997551d03646d42c2">&#9670;&#160;</a></span>ARM_MCI_Uninitialize()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ARM_MCI_Uninitialize </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>De-initialize Memory Card Interface. </p>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__execution__status.html">Status Error Codes</a></dd></dl>
<p>The function <b>ARM_MCI_Uninitialize</b> de-initializes the resources of I2C interface.</p>
<p>It is called when the middleware component stops operation and releases the software resources used by the interface. </p>

</div>
</div>
<a id="ga19752749d04ed22dc91c4294645e0244" name="ga19752749d04ed22dc91c4294645e0244"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga19752749d04ed22dc91c4294645e0244">&#9670;&#160;</a></span>ARM_MCI_PowerControl()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ARM_MCI_PowerControl </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__common__drv__gr.html#ga47d6d7c31f88f3b8ae4aaf9d8444afa5">ARM_POWER_STATE</a>&#160;</td>
          <td class="paramname"><em>state</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Control Memory Card Interface Power. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">state</td><td>Power state <a class="el" href="group__common__drv__gr.html#ga47d6d7c31f88f3b8ae4aaf9d8444afa5">ARM_POWER_STATE</a> </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__execution__status.html">Status Error Codes</a></dd></dl>
<p><br  />
 The function <b>ARM_MCI_PowerControl</b> operates the power modes of the MCI interface. <br  />
</p>
<p>The parameter <em>state</em> can have the following values:</p><ul>
<li><a class="el" href="Driver__Common_8h.html#ga47d6d7c31f88f3b8ae4aaf9d8444afa5abed52b77a9ce4775570e44a842b1295e">ARM_POWER_FULL</a> : set-up peripheral for data transfers, enable interrupts (NVIC) and optionally DMA. Can be called multiple times. If the peripheral is already in this mode, then the function performs no operation and returns with <a class="el" href="group__execution__status.html#ga85752c5de59e8adeb001e35ff5be6be7">ARM_DRIVER_OK</a>.</li>
<li><a class="el" href="Driver__Common_8h.html#ga47d6d7c31f88f3b8ae4aaf9d8444afa5a9ef9e57cbcc948d0e22314e73dc8c434">ARM_POWER_LOW</a> : may use power saving. Returns <a class="el" href="group__execution__status.html#ga2efa59e480d82697795439220e6884e4">ARM_DRIVER_ERROR_UNSUPPORTED</a> when not implemented.</li>
<li><a class="el" href="Driver__Common_8h.html#ga47d6d7c31f88f3b8ae4aaf9d8444afa5ab6f5becc85ebd51c3dd2524a95d2ca35">ARM_POWER_OFF</a> : terminates any pending data transfers, disables peripheral, disables related interrupts and DMA.</li>
</ul>
<p>Refer to <a class="el" href="theoryOperation.html#CallSequence">Function Call Sequence</a> for more information. </p>

</div>
</div>
<a id="gab161f80e0eda2815f3e0ebbba1314ff0" name="gab161f80e0eda2815f3e0ebbba1314ff0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab161f80e0eda2815f3e0ebbba1314ff0">&#9670;&#160;</a></span>ARM_MCI_CardPower()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ARM_MCI_CardPower </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>voltage</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set Memory Card Power supply voltage. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">voltage</td><td>Memory Card Power supply voltage </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__execution__status.html">Status Error Codes</a></dd></dl>
<p>The function <b>ARM_MCI_CardPower</b> operates the memory card power supply voltage.</p>
<p>The parameter <em>voltage</em> sets the voltage. Not every voltage might be supported by the driver implementation. The structure <a class="el" href="group__mci__interface__gr.html#structARM__MCI__CAPABILITIES">ARM_MCI_CAPABILITIES</a> encodes the supported voltage. Retrieve the information with the function <a class="el" href="group__mci__interface__gr.html#ga7e5a78b6e6409189833a0b72a0a3c48a">ARM_MCI_GetCapabilities</a> and verify the data fields.</p>
<p>The following values:</p>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadLeft">Parameter <em>voltage</em>   </th><th class="markdownTableHeadLeft">Description   </th><th class="markdownTableHeadNone">supported when <a class="el" href="group__mci__interface__gr.html#structARM__MCI__CAPABILITIES" title="MCI Driver Capabilities.">ARM_MCI_CAPABILITIES</a>    </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__card__power__ctrls.html#ga288fbd80b384739a80e8f3ec31205cf5">ARM_MCI_POWER_VDD_OFF</a>   </td><td class="markdownTableBodyLeft">VDD (VCC) turned off   </td><td class="markdownTableBodyNone"><em>always supported</em>    </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__card__power__ctrls.html#ga565ecd36c8d0379fb4172da577cc540d">ARM_MCI_POWER_VDD_3V3</a>   </td><td class="markdownTableBodyLeft">VDD (VCC) = <span class="XML-Token">3.3V</span>   </td><td class="markdownTableBodyNone">data field <em>vdd</em> = <span class="XML-Token">1</span>    </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__card__power__ctrls.html#ga2ce8e379c3691da3b51c9c97d61770ef">ARM_MCI_POWER_VDD_1V8</a>   </td><td class="markdownTableBodyLeft">VDD (VCC) = <span class="XML-Token">1.8V</span>   </td><td class="markdownTableBodyNone">data field <em>vdd_1v8</em> = <span class="XML-Token">1</span>    </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__card__power__ctrls.html#ga6929c98a6bc8d898939a95111509220b">ARM_MCI_POWER_VCCQ_OFF</a>   </td><td class="markdownTableBodyLeft">eMMC VCCQ turned off   </td><td class="markdownTableBodyNone"><em>always supported</em>    </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__card__power__ctrls.html#ga91a7201173cc092eaf7f0bcee028871e">ARM_MCI_POWER_VCCQ_3V3</a>   </td><td class="markdownTableBodyLeft">eMMC VCCQ = <span class="XML-Token">3.3V</span>   </td><td class="markdownTableBodyNone">data field <em>vccq</em> = <span class="XML-Token">1</span>    </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__card__power__ctrls.html#gaaf389e0a139d5808dff8ebb6897d4c7b">ARM_MCI_POWER_VCCQ_1V8</a>   </td><td class="markdownTableBodyLeft">eMMC VCCQ = <span class="XML-Token">1.8V</span>   </td><td class="markdownTableBodyNone">data field <em>vccq_1v8</em> = <span class="XML-Token">1</span>    </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__card__power__ctrls.html#ga5304b3b6cadc5113f841c3d526ab5db6">ARM_MCI_POWER_VCCQ_1V2</a>   </td><td class="markdownTableBodyLeft">eMMC VCCQ = <span class="XML-Token">1.2V</span>   </td><td class="markdownTableBodyNone">data field <em>vccq_1v2</em> = <span class="XML-Token">1</span>   </td></tr>
</table>

</div>
</div>
<a id="ga012fca8f1ce5366fce14b708c771c635" name="ga012fca8f1ce5366fce14b708c771c635"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga012fca8f1ce5366fce14b708c771c635">&#9670;&#160;</a></span>ARM_MCI_ReadCD()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ARM_MCI_ReadCD </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Read Card Detect (CD) state. </p>
<dl class="section return"><dt>Returns</dt><dd>1:card detected, 0:card not detected, or error</dd></dl>
<p>The function <b>ARM_MCI_ReadCD</b> reads the status of the Card Detect (CD) pin. </p>

</div>
</div>
<a id="ga3d70286918405ac81fa795c7d09dc6fd" name="ga3d70286918405ac81fa795c7d09dc6fd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3d70286918405ac81fa795c7d09dc6fd">&#9670;&#160;</a></span>ARM_MCI_ReadWP()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ARM_MCI_ReadWP </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Read Write Protect (WP) state. </p>
<dl class="section return"><dt>Returns</dt><dd>1:write protected, 0:not write protected, or error</dd></dl>
<p>The function <b>ARM_MCI_ReadWP</b> reads the status of the Write Protect (WP) pin. </p>

</div>
</div>
<a id="ga5a431da89feabc2b4bc0c27943dff6f2" name="ga5a431da89feabc2b4bc0c27943dff6f2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga5a431da89feabc2b4bc0c27943dff6f2">&#9670;&#160;</a></span>ARM_MCI_SendCommand()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ARM_MCI_SendCommand </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>cmd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>arg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>flags</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t *&#160;</td>
          <td class="paramname"><em>response</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Send Command to card and get the response. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">cmd</td><td>Memory Card command </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">arg</td><td>Command argument </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">flags</td><td>Command flags </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">response</td><td>Pointer to buffer for response </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__execution__status.html">Status Error Codes</a></dd></dl>
<p>The function <b>ARM_MCI_SendCommand</b> </p><ul>
<li>sends commands to the memory card</li>
<li>retrieve the response from the card</li>
<li>optionally, start the data transfer.</li>
</ul>
<p>The parameter <em>cmd</em> is the command sent to the card. <br  />
The parameter <em>arg</em> contains arguments for the command <em>cmd</em>. <br  />
The parameter <em>flags</em> controls the behavior of the operation and takes predefined values listed in the table below. <br  />
The parameter <em>response</em> is a pointer to receive data.</p>
<p>The parameter <em>flags</em> can have the following values:</p>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadLeft">Parameter <em>flags</em>   </th><th class="markdownTableHeadLeft">Description    </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__send__command__flags__ctrls.html#ga70934cef80884e8c75fb4eebf8452118">ARM_MCI_RESPONSE_NONE</a>   </td><td class="markdownTableBodyLeft">No response expected (default)    </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__send__command__flags__ctrls.html#gaa5ddf1cf772b234e3c247039effd0e7b">ARM_MCI_RESPONSE_SHORT</a>   </td><td class="markdownTableBodyLeft">Short response (<span class="XML-Token">48</span>-bit) expected    </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__send__command__flags__ctrls.html#gaa1d541b0edf32ec05e68d623c727ef9c">ARM_MCI_RESPONSE_SHORT_BUSY</a>   </td><td class="markdownTableBodyLeft">Short response with busy signal (<span class="XML-Token">48</span>-bit) expected    </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__send__command__flags__ctrls.html#gac49c7b39a7c51bd2193e048835bec2fb">ARM_MCI_RESPONSE_LONG</a>   </td><td class="markdownTableBodyLeft">Long response (<span class="XML-Token">136</span>-bit) expected    </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__send__command__flags__ctrls.html#ga497abf878c6e12f54cc7ddb92da76c4a">ARM_MCI_RESPONSE_INDEX</a>   </td><td class="markdownTableBodyLeft">Check command index in response    </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__send__command__flags__ctrls.html#ga6ab3f4c1a2bf0fdb81fbcf7a5698f2de">ARM_MCI_RESPONSE_CRC</a>   </td><td class="markdownTableBodyLeft">Check CRC in response    </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__send__command__flags__ctrls.html#ga68e879799bb27a1b13baf57ed19d719d">ARM_MCI_WAIT_BUSY</a>   </td><td class="markdownTableBodyLeft">Wait until busy before sending the command    </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__send__command__flags__ctrls.html#ga8aa566f69aa74ed416213df6ca3267bd">ARM_MCI_TRANSFER_DATA</a>   </td><td class="markdownTableBodyLeft">Activate Data transfer    </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__send__command__flags__ctrls.html#ga81606bd94ce782e2c3764b913f929f60">ARM_MCI_CARD_INITIALIZE</a>   </td><td class="markdownTableBodyLeft">Execute Memory Card initialization sequence    </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__send__command__flags__ctrls.html#gab2bfeedf1dc2df1872ebbcc559a7385a">ARM_MCI_INTERRUPT_COMMAND</a>   </td><td class="markdownTableBodyLeft">Send Interrupt command (CMD40 - MMC only)    </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__send__command__flags__ctrls.html#gabc31b6b26988998c84c92a9a698fd5dc">ARM_MCI_INTERRUPT_RESPONSE</a>   </td><td class="markdownTableBodyLeft">Send Interrupt response (CMD40 - MMC only)    </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__send__command__flags__ctrls.html#gae04254f51dfd9838583206cae0a5f8f7">ARM_MCI_BOOT_OPERATION</a>   </td><td class="markdownTableBodyLeft">Execute Boot operation (MMC only)    </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__send__command__flags__ctrls.html#ga30bd304652d4f870ee7ce61c266a9348">ARM_MCI_BOOT_ALTERNATIVE</a>   </td><td class="markdownTableBodyLeft">Execute Alternative Boot operation (MMC only)    </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__send__command__flags__ctrls.html#ga8c55bc0a310630d49810802ccd1bb10d">ARM_MCI_BOOT_ACK</a>   </td><td class="markdownTableBodyLeft">Expect Boot Acknowledge (MMC only)    </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__send__command__flags__ctrls.html#gab9df5169b37621764f8bb0f93db5281a">ARM_MCI_CCSD</a>   </td><td class="markdownTableBodyLeft">Send Command Completion Signal Disable (CCSD) for CE-ATA device    </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__send__command__flags__ctrls.html#gab82c472e4ca3fca12ae3291e25997f00">ARM_MCI_CCS</a>   </td><td class="markdownTableBodyLeft">Expect Command Completion Signal (CCS) for CE-ATA device   </td></tr>
</table>
<p>Calling the function <b>ARM_MCI_SendCommand</b> only starts the operation. The function is non-blocking and returns as soon as the driver has started the operation. It is not allowed to call this function again until the operation is in progress.</p>
<p>After the command is sent the response is retrieved if specified with <b>ARM_MCI_RESPONSE_xxx</b> flags. When the command completes successfully (requested response is received without errors) the <a class="el" href="group__mci__event__gr.html#gae69356c75d55103d93ef91ac1bc02b49">ARM_MCI_EVENT_COMMAND_COMPLETE</a> event is generated. In case that response is requested but not received the <a class="el" href="group__mci__event__gr.html#gab79b3ab4dcd03c38df1e173fa903d822">ARM_MCI_EVENT_COMMAND_TIMEOUT</a> event is generated instead. In case of invalid response (or CRC error) the <a class="el" href="group__mci__event__gr.html#ga373aeb3eca0e4c6d159312488a130442">ARM_MCI_EVENT_COMMAND_ERROR</a> event is generated instead. Progress of command operation can be monitored by calling the <a class="el" href="group__mci__interface__gr.html#ga8d61aa42ce78d1864fa928c1f273cbd9">ARM_MCI_GetStatus</a> and checking the <em>command_active</em> flag.</p>
<p>After the command operation the data transfer operation is started if specified with <b>ARM_MCI_TRANSFER_DATA</b> flag. The data transfer needs to be configured before that by calling the <a class="el" href="group__mci__interface__gr.html#gaaec681bcd8e6811c5743e33ee0f35ed1">ARM_MCI_SetupTransfer</a>. When the data transfer completes successfully the <a class="el" href="group__mci__event__gr.html#gabc3c468dedaed890683360f2c5c65bea">ARM_MCI_EVENT_TRANSFER_COMPLETE</a> event is generated. In case that data transfer is not completed in-time (specified by <a class="el" href="group__mci__mode__ctrls.html#ga09a58821e42595f0c2e55f8cc2d32ceb">ARM_MCI_DATA_TIMEOUT</a>) the <a class="el" href="group__mci__event__gr.html#ga614e7c7226adbaa8ec4165bf8b87ef27">ARM_MCI_EVENT_TRANSFER_TIMEOUT</a> event is generated instead. In case of CRC errors the <a class="el" href="group__mci__event__gr.html#ga5d2cee5ba6d0e40ad505983155706c29">ARM_MCI_EVENT_TRANSFER_ERROR</a> event is generated instead. Progress of data transfer operation can be monitored by calling the <a class="el" href="group__mci__interface__gr.html#ga8d61aa42ce78d1864fa928c1f273cbd9">ARM_MCI_GetStatus</a> and checking the <em>transfer_active</em> flag.</p>
<p><b>See also:</b></p><ul>
<li><a class="el" href="group__mci__interface__gr.html#gaac2dbd1c1a98436938c5d0d6248cb700">ARM_MCI_SignalEvent</a> </li>
</ul>

</div>
</div>
<a id="gaaec681bcd8e6811c5743e33ee0f35ed1" name="gaaec681bcd8e6811c5743e33ee0f35ed1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaaec681bcd8e6811c5743e33ee0f35ed1">&#9670;&#160;</a></span>ARM_MCI_SetupTransfer()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ARM_MCI_SetupTransfer </td>
          <td>(</td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>block_count</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>block_size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>mode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Setup read or write transfer operation. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">data</td><td>Pointer to data block(s) to be written or read </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">block_count</td><td>Number of blocks </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">block_size</td><td>Size of a block in bytes </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">mode</td><td>Transfer mode </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__execution__status.html">Status Error Codes</a></dd></dl>
<p>The function <b>ARM_MCI_SetupTransfer</b> prepares the data transfer operation that is initiated by calling the function <a class="el" href="group__mci__interface__gr.html#ga5a431da89feabc2b4bc0c27943dff6f2">ARM_MCI_SendCommand</a> with the parameter <em>flags</em> = <a class="el" href="group__mci__send__command__flags__ctrls.html#ga8aa566f69aa74ed416213df6ca3267bd">ARM_MCI_TRANSFER_DATA</a>.</p>
<p>The parameter <em>data</em> is a pointer to the data to transfer. <br  />
The parameter <em>block_count</em> is the number of blocks to transfer. <br  />
The parameter <em>block_size</em> is the size of a block. <br  />
The parameter <em>mode</em> sets the transfer mode and can have the values liste in the table below:</p>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadLeft">Transfer Directions   </th><th class="markdownTableHeadLeft">Description    </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__transfer__ctrls.html#gaa6f3be235a9dce5c66be8fe64f399846">ARM_MCI_TRANSFER_READ</a>   </td><td class="markdownTableBodyLeft">Read data from MCI    </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__transfer__ctrls.html#gaddc60aab15f75993a99f98f71ddbd50c">ARM_MCI_TRANSFER_WRITE</a>   </td><td class="markdownTableBodyLeft">Write data to MCI    </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__transfer__ctrls.html#ga4ced782e7c0c70d5f0edbddd1e48323b">ARM_MCI_TRANSFER_BLOCK</a> (default)   </td><td class="markdownTableBodyLeft">Block Data transfer    </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__transfer__ctrls.html#gac7db0cffd571e60758627d889ba7a432">ARM_MCI_TRANSFER_STREAM</a>   </td><td class="markdownTableBodyLeft">Stream Data transfer (MMC only)   </td></tr>
</table>

</div>
</div>
<a id="ga3dfcf7b7186b711f9b63a096be816fe5" name="ga3dfcf7b7186b711f9b63a096be816fe5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3dfcf7b7186b711f9b63a096be816fe5">&#9670;&#160;</a></span>ARM_MCI_AbortTransfer()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ARM_MCI_AbortTransfer </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Abort current read/write data transfer. </p>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__execution__status.html">Status Error Codes</a></dd></dl>
<p>The function <b>ARM_MCI_AbortTransfer</b> aborts the active data transfer operation initiated with <a class="el" href="group__mci__interface__gr.html#ga5a431da89feabc2b4bc0c27943dff6f2">ARM_MCI_SendCommand</a>. </p>

</div>
</div>
<a id="gaec0506a2aa4ae75cf6bc02528f36fe30" name="gaec0506a2aa4ae75cf6bc02528f36fe30"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaec0506a2aa4ae75cf6bc02528f36fe30">&#9670;&#160;</a></span>ARM_MCI_Control()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ARM_MCI_Control </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>control</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>arg</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Control MCI Interface. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">control</td><td>Operation </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">arg</td><td>Argument of operation (optional) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__execution__status.html">Status Error Codes</a></dd></dl>
<p>Th function <b>ARM_MCI_Control</b> controls the MCI interface and executes various operations.</p>
<p>The parameter <em>control</em> specifies the operation. <br  />
 Values for <em>control</em> cannot be ORed, but must be called separately in the code. <br  />
The parameter <em>arg</em> provides, depending on the operation, additional information or sets values.</p>
<dl class="section note"><dt>Note</dt><dd>For parameters, the values marked with (default) are the setting after the driver initialization.</dd></dl>
<p>The table lists values for the parameter <em>control</em>.</p>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadLeft">Parameter <em>control</em>   </th><th class="markdownTableHeadLeft">Operation    </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__mode__ctrls.html#ga7f982d2e5aec768307d35a83c65fb3ef">ARM_MCI_BUS_SPEED</a>   </td><td class="markdownTableBodyLeft">Set the Bus Speed. The parameter <em>arg</em> specifies the speed in bits/s; The function returns the bus speed configured in bits/s.    </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__mode__ctrls.html#gaf7ede525eabc618fbbb9f7a294c8ed96">ARM_MCI_BUS_SPEED_MODE</a>   </td><td class="markdownTableBodyLeft">Set the Bus Speed Mode. Predefined values for <em>arg</em> are listed in the table <b>Bus Speed Mode</b>.    </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__mode__ctrls.html#ga8b7571e37520c07d8ef4f697f3886715">ARM_MCI_BUS_CMD_MODE</a>   </td><td class="markdownTableBodyLeft">Set the CMD Line Mode. Predefined values for <em>arg</em> are listed in the table <b>Bus CMD Line Mode</b>.    </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__mode__ctrls.html#ga876d964d0eeacdb16e93f7558a544587">ARM_MCI_BUS_DATA_WIDTH</a>   </td><td class="markdownTableBodyLeft">Set data bus width. Predefined values for <em>arg</em> are encoded in <b>Bus Data Width</b>.    </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__mode__ctrls.html#ga78068f519139f2ae7b09e0608070aaf6">ARM_MCI_DRIVER_STRENGTH</a>   </td><td class="markdownTableBodyLeft">Set driver strength. Predefined values for <em>arg</em> are listed in the table <b>Driver Type</b>    </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__mode__ctrls.html#ga21e403e8c3fa8cc75431a513813f0a16">ARM_MCI_CONTROL_RESET</a>   </td><td class="markdownTableBodyLeft">Control optional RST_n Pin (eMMC). The parameter <em>arg</em> can have the values <span class="XML-Token">[0:inactive(default); 1:active]</span>    </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__mode__ctrls.html#ga889473fbfbdcb89aab4d53cc8a13f615">ARM_MCI_CONTROL_CLOCK_IDLE</a>   </td><td class="markdownTableBodyLeft">Control clock generation on CLK Pin when idle. The parameter <em>arg</em> can have the values <span class="XML-Token">[0:disabled; 1:enabled]</span>    </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__mode__ctrls.html#ga98853f60bdc085aeeccd66f7bdf22d3d">ARM_MCI_UHS_TUNING_OPERATION</a>   </td><td class="markdownTableBodyLeft">Sampling clock Tuning operation (SD UHS-I). The parameter <em>arg</em> can have the values <span class="XML-Token">[0:reset; 1:execute]</span>    </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__mode__ctrls.html#gabd3af448e26da5657c1c5a03330476b7">ARM_MCI_UHS_TUNING_RESULT</a>   </td><td class="markdownTableBodyLeft">Sampling clock Tuning result (SD UHS-I). Returns <span class="XML-Token">[0:done; 1:in progress; -1:error]</span>    </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__mode__ctrls.html#ga09a58821e42595f0c2e55f8cc2d32ceb">ARM_MCI_DATA_TIMEOUT</a>   </td><td class="markdownTableBodyLeft">Set Data timeout; The parameter <em>arg</em> sets the timeout in bus cycles.    </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__mode__ctrls.html#gae97b1a819a5d326b1f1009b0d6d48b5a">ARM_MCI_CSS_TIMEOUT</a>   </td><td class="markdownTableBodyLeft">Set Command Completion Signal (CCS) timeout. The parameter <em>arg</em> sets timeout in bus cycles.    </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__mode__ctrls.html#ga19fd7d3b74ac48ca74a2e138b3ee9963">ARM_MCI_MONITOR_SDIO_INTERRUPT</a>   </td><td class="markdownTableBodyLeft">Monitor SD I/O interrupt. The parameter <em>arg</em> can have the values <span class="XML-Token">[0:disabled(default); 1:enabled]</span>. Monitoring is automatically disabled when an interrupt is recognized.    </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__mode__ctrls.html#gaaa10c5aa7a8108aa59c3734b3eec2e3a">ARM_MCI_CONTROL_READ_WAIT</a>   </td><td class="markdownTableBodyLeft">Control Read/Wait states for SD I/O. The parameter <em>arg</em> can have the values <span class="XML-Token">[0:disabled(default); 1:enabled]</span>.    </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__mode__ctrls.html#ga04cf174b0ef13240f26225bf8e45a4a0">ARM_MCI_SUSPEND_TRANSFER</a>   </td><td class="markdownTableBodyLeft">Suspend Data transfer (SD I/O). Returns the number of remaining bytes to transfer.    </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__mode__ctrls.html#gac4907319499072fddf61f2f83b0dd966">ARM_MCI_RESUME_TRANSFER</a>   </td><td class="markdownTableBodyLeft">Resume Data transfer (SD I/O).   </td></tr>
</table>
<p><b>Bus Speed Mode</b></p>
<p>The function <a class="el" href="group__mci__interface__gr.html#ga7e5a78b6e6409189833a0b72a0a3c48a">ARM_MCI_GetCapabilities</a> lists the supported bus speed modes. Initially, all SD cards use a 3.3 volt electrical interface. Some SD cards can switch to 1.8 volt operation. For example, the use of ultra-high-speed (UHS) SD cards requires 1.8 volt operation and a 4-bit bus data width. The bit field <a class="el" href="group__mci__interface__gr.html#a084188480d589cdc8d3e164b9f41bea9" title="Supports SD UHS-I (Ultra High Speed) 1.8V signaling.">ARM_MCI_CAPABILITIES.uhs_signaling</a> encodes whether the driver supports 1.8 volt UHS signaling.</p>
<p>The <em>control</em> operation <b>ARM_MCI_BUS_SPEED_MODE</b> sets the bus speed mode using the parameter <em>arg</em>.</p>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadLeft">Parameter <em>arg</em>   </th><th class="markdownTableHeadLeft">Bus Speed Mode    </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__bus__speed__ctrls.html#ga601fa8b27ab2e5f6d90c93d54c8f412d">ARM_MCI_BUS_DEFAULT_SPEED</a> (default)   </td><td class="markdownTableBodyLeft">Set the bus speed for SD/MMC cards: Default Speed mode up to <span class="XML-Token">[25;26]MHz</span>    </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__bus__speed__ctrls.html#gaabda746ac7d6b4497358ff655a8ea6be">ARM_MCI_BUS_HIGH_SPEED</a>   </td><td class="markdownTableBodyLeft">Set the bus speed for SD/MMC: High Speed mode up to <span class="XML-Token">[50;52]MHz</span>    </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__bus__speed__ctrls.html#ga0473c44a7b65044b3c6a8e7012009a4a">ARM_MCI_BUS_UHS_SDR12</a>   </td><td class="markdownTableBodyLeft">Set the bus speed for SD: SDR12 (Single Data Rate) up to <span class="XML-Token">25MHz, 12.5MB/s: UHS-I (Ultra High Speed) 1.8V signalling</span>    </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__bus__speed__ctrls.html#gae32422631052307b3c4d269b25415907">ARM_MCI_BUS_UHS_SDR25</a>   </td><td class="markdownTableBodyLeft">Set the bus speed for SD: SDR25 (Single Data Rate) up to <span class="XML-Token">50MHz, 25 MB/s: UHS-I (Ultra High Speed) 1.8V signalling</span>    </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__bus__speed__ctrls.html#ga9f326c02391d965918ae619b912b81e7">ARM_MCI_BUS_UHS_SDR50</a>   </td><td class="markdownTableBodyLeft">Set the bus speed for SD: SDR50 (Single Data Rate) up to <span class="XML-Token">100MHz, 50 MB/s: UHS-I (Ultra High Speed) 1.8V signalling</span>    </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__bus__speed__ctrls.html#gad2bab563e7bbb4bcf6bdabe6a13dadf4">ARM_MCI_BUS_UHS_SDR104</a>   </td><td class="markdownTableBodyLeft">Set the bus speed for SD: SDR104 (Single Data Rate) up to <span class="XML-Token">208MHz, 104 MB/s: UHS-I (Ultra High Speed) 1.8V signalling</span>    </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__bus__speed__ctrls.html#ga04da920a5cac99eab9784527057f1b9c">ARM_MCI_BUS_UHS_DDR50</a>   </td><td class="markdownTableBodyLeft">Set the bus speed for SD: DDR50 (Dual Data Rate) up to <span class="XML-Token">50MHz, 50 MB/s: UHS-I (Ultra High Speed) 1.8V signalling</span>   </td></tr>
</table>
<p><b>Bus CMD Line Mode</b></p>
<p>The <em>control</em> operation <b>ARM_MCI_BUS_CMD_MODE</b> sets the bus command line mode using the parameter <em>arg</em>.</p>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadLeft">Parameter <em>arg</em>   </th><th class="markdownTableHeadLeft">Bus CMD Line Mode    </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__cmd__line__ctrls.html#gaaed404312d9bc073e3489779a911c7dc">ARM_MCI_BUS_CMD_PUSH_PULL</a> (default)   </td><td class="markdownTableBodyLeft">Set the Push-Pull CMD line    </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__cmd__line__ctrls.html#gaadf8667985731964d57d1ed672e90fd3">ARM_MCI_BUS_CMD_OPEN_DRAIN</a>   </td><td class="markdownTableBodyLeft">Set the Open Drain CMD line (MMC only)   </td></tr>
</table>
<p><b>Bus Data Width</b></p>
<p>Specifies the bus data width (the number of data I/O pins on the SD/MMC interface).</p>
<p>For high speed memory cards, a 4-bit bus data width should be used (or 8-bit for eMMC). The bit fields <a class="el" href="group__mci__interface__gr.html#a950669a8c88b49c8da4c56163b45a79d" title="Supports 4-bit data.">ARM_MCI_CAPABILITIES.data_width_4</a> and <a class="el" href="group__mci__interface__gr.html#a808703d6c70a501464e156e55f5cabd2" title="Supports 8-bit data.">ARM_MCI_CAPABILITIES.data_width_8</a> encode whether the driver supports a specific bus data with.</p>
<p>The <em>control</em> operation <b>ARM_MCI_BUS_DATA_WIDTH</b> sets the bus data width using the parameter <em>arg</em>.</p>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadLeft">Parameter <em>arg</em>   </th><th class="markdownTableHeadLeft">Bus Data Width    </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__bus__data__width__ctrls.html#gaa09a00d810a4dfd1d1824311ee290585">ARM_MCI_BUS_DATA_WIDTH_1</a> (default)   </td><td class="markdownTableBodyLeft">Set the Bus data width to <span class="XML-Token">1 bit</span>    </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__bus__data__width__ctrls.html#gaa28150d8c3789e8cf1bcda318f74a28c">ARM_MCI_BUS_DATA_WIDTH_4</a>   </td><td class="markdownTableBodyLeft">Set the Bus data width to <span class="XML-Token">4 bits</span>    </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__bus__data__width__ctrls.html#ga3bb99a2d98ba9fb8c5bc97fa2b8ef469">ARM_MCI_BUS_DATA_WIDTH_8</a>   </td><td class="markdownTableBodyLeft">Set the Bus data width to <span class="XML-Token">8 bits</span>    </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__bus__data__width__ctrls.html#gaccb174bd131f8fd8cd9a56439a8ebb60">ARM_MCI_BUS_DATA_WIDTH_4_DDR</a>   </td><td class="markdownTableBodyLeft">Set the Bus data width to <span class="XML-Token">4 bits</span>, DDR (Dual Data Rate) - MMC only    </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__bus__data__width__ctrls.html#ga7b31f81ae703229095fe9efcfbe80b47">ARM_MCI_BUS_DATA_WIDTH_8_DDR</a>   </td><td class="markdownTableBodyLeft">Set the Bus data width to <span class="XML-Token">8 bits</span>, DDR (Dual Data Rate) - MMC only   </td></tr>
</table>
<p><b>Driver Type</b></p>
<p>Specifies the interface driver type.</p>
<p>The <em>control</em> operation <b>ARM_MCI_DRIVER_STRENGTH</b> sets the interface driver type using the parameter <em>arg</em>.</p>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadLeft">Parameter <em>arg</em>   </th><th class="markdownTableHeadLeft">Driver Type    </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__driver__strength__ctrls.html#ga64eb1c4847711a262f084c361b60a912">ARM_MCI_DRIVER_TYPE_A</a>   </td><td class="markdownTableBodyLeft">Set the interface to SD UHS-I Driver Type A    </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__driver__strength__ctrls.html#ga078d3c3bc7c9335b92e6445a0abafc46">ARM_MCI_DRIVER_TYPE_B</a> (default)   </td><td class="markdownTableBodyLeft">Set the interface to SD UHS-I Driver Type B    </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__driver__strength__ctrls.html#ga3da11696d1fcd3930eb7e70fe097d747">ARM_MCI_DRIVER_TYPE_C</a>   </td><td class="markdownTableBodyLeft">Set the interface to SD UHS-I Driver Type C    </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__driver__strength__ctrls.html#ga8185f82b1d8857a3f0eb461d664f2b3d">ARM_MCI_DRIVER_TYPE_D</a>   </td><td class="markdownTableBodyLeft">Set the interface to SD UHS-I Driver Type D   </td></tr>
</table>
<p><b>Examples:</b> </p><div class="fragment"><div class="line"><span class="comment">// Set Bus Speed to 25MHz</span></div>
<div class="line">MCIdrv-&gt;Control(<a class="code hl_define" href="group__mci__mode__ctrls.html#ga7f982d2e5aec768307d35a83c65fb3ef">ARM_MCI_BUS_SPEED</a>, 25000000);</div>
<div class="line"> </div>
<div class="line"><span class="comment">// Set High Speed mode</span></div>
<div class="line">MCIdrv-&gt;Control(<a class="code hl_define" href="group__mci__mode__ctrls.html#gaf7ede525eabc618fbbb9f7a294c8ed96">ARM_MCI_BUS_SPEED_MODE</a>, <a class="code hl_define" href="group__mci__bus__speed__ctrls.html#gaabda746ac7d6b4497358ff655a8ea6be">ARM_MCI_BUS_HIGH_SPEED</a>);</div>
<div class="line"> </div>
<div class="line"><span class="comment">// Configure CMD line as Open Drain (MMC only)</span></div>
<div class="line">MCIdrv-&gt;Control(<a class="code hl_define" href="group__mci__mode__ctrls.html#ga8b7571e37520c07d8ef4f697f3886715">ARM_MCI_BUS_CMD_MODE</a>, <a class="code hl_define" href="group__mci__cmd__line__ctrls.html#gaadf8667985731964d57d1ed672e90fd3">ARM_MCI_BUS_CMD_OPEN_DRAIN</a>);</div>
<div class="line"> </div>
<div class="line"><span class="comment">// Set Bus Data Width = 4bits</span></div>
<div class="line">MCIdrv-&gt;Control(<a class="code hl_define" href="group__mci__mode__ctrls.html#ga876d964d0eeacdb16e93f7558a544587">ARM_MCI_BUS_DATA_WIDTH</a>, <a class="code hl_define" href="group__mci__bus__data__width__ctrls.html#gaa28150d8c3789e8cf1bcda318f74a28c">ARM_MCI_BUS_DATA_WIDTH_4</a>);</div>
<div class="line"> </div>
<div class="line"><span class="comment">// Set SD UHS-I Driver Type B</span></div>
<div class="line">MCIdrv-&gt;Control(<a class="code hl_define" href="group__mci__mode__ctrls.html#ga78068f519139f2ae7b09e0608070aaf6">ARM_MCI_DRIVER_STRENGTH</a>, <a class="code hl_define" href="group__mci__driver__strength__ctrls.html#ga078d3c3bc7c9335b92e6445a0abafc46">ARM_MCI_DRIVER_TYPE_B</a>);</div>
<div class="line"> </div>
<div class="line"><span class="comment">// RTS_n Pin is not active by default</span></div>
<div class="line"><span class="comment">// Assert RTS_n Pin (eMMC)</span></div>
<div class="line">MCIdrv-&gt;Control(<a class="code hl_define" href="group__mci__mode__ctrls.html#ga21e403e8c3fa8cc75431a513813f0a16">ARM_MCI_CONTROL_RESET</a>, 1);</div>
<div class="line"><span class="comment">// De-assert RTS_n Pin (eMMC)</span></div>
<div class="line">MCIdrv-&gt;Control(<a class="code hl_define" href="group__mci__mode__ctrls.html#ga21e403e8c3fa8cc75431a513813f0a16">ARM_MCI_CONTROL_RESET</a>, 0);</div>
<div class="line"> </div>
<div class="line"><span class="comment">// Clock generation on CLK when Idle: hardware specific default behavior</span></div>
<div class="line"><span class="comment">// Enable Clock generation on CLK when Idle</span></div>
<div class="line">MCIdrv-&gt;Control(<a class="code hl_define" href="group__mci__mode__ctrls.html#ga889473fbfbdcb89aab4d53cc8a13f615">ARM_MCI_CONTROL_CLOCK_IDLE</a>, 1);</div>
<div class="line"><span class="comment">// Disable Clock generation on CLK when Idle</span></div>
<div class="line">MCIdrv-&gt;Control(<a class="code hl_define" href="group__mci__mode__ctrls.html#ga889473fbfbdcb89aab4d53cc8a13f615">ARM_MCI_CONTROL_CLOCK_IDLE</a>, 0);</div>
<div class="line"> </div>
<div class="line"><span class="comment">// UHS Tuning</span></div>
<div class="line">MCIdrv-&gt;Control(<a class="code hl_define" href="group__mci__mode__ctrls.html#ga98853f60bdc085aeeccd66f7bdf22d3d">ARM_MCI_UHS_TUNING_OPERATION</a>, 1);  <span class="comment">// start tuning</span></div>
<div class="line"><span class="keywordflow">do</span> {</div>
<div class="line">  status = MCIdrv-&gt;Control(<a class="code hl_define" href="group__mci__mode__ctrls.html#gabd3af448e26da5657c1c5a03330476b7">ARM_MCI_UHS_TUNING_RESULT</a>, 0<span class="comment">/*argument not used*/</span>);</div>
<div class="line">  <span class="keywordflow">if</span> (status == -1) { <span class="keywordflow">break</span>; <span class="comment">/* tuning failed */</span> }</div>
<div class="line">} <span class="keywordflow">while</span> (status == 1);</div>
<div class="line"> </div>
<div class="line"><span class="comment">// Set Data Timeout to 12500000 bus cycles (0.5s @25MHz Bus Speed)</span></div>
<div class="line"><span class="comment">// Default value is hardware specific (typically 2^32-1)</span></div>
<div class="line">MCIdrv-&gt;Control(<a class="code hl_define" href="group__mci__mode__ctrls.html#ga09a58821e42595f0c2e55f8cc2d32ceb">ARM_MCI_DATA_TIMEOUT</a>, 12500000);</div>
<div class="line">  </div>
<div class="line"><span class="comment">// Set CSS Timeout to 1000000 bus cycles</span></div>
<div class="line"><span class="comment">// Default value is hardware specific</span></div>
<div class="line">MCIdrv-&gt;Control(<a class="code hl_define" href="group__mci__mode__ctrls.html#gae97b1a819a5d326b1f1009b0d6d48b5a">ARM_MCI_CSS_TIMEOUT</a>, 1000000);</div>
<div class="line"> </div>
<div class="line"><span class="comment">// SD I/O Interrupt Monitoring is disabled by default</span></div>
<div class="line"><span class="comment">// Enable SD I/O Interrupt Monitoring</span></div>
<div class="line">MCIdrv-&gt;Control(<a class="code hl_define" href="group__mci__mode__ctrls.html#ga19fd7d3b74ac48ca74a2e138b3ee9963">ARM_MCI_MONITOR_SDIO_INTERRUPT</a>, 1);</div>
<div class="line"><span class="comment">// Disable SD I/O Interrupt Monitoring</span></div>
<div class="line">MCIdrv-&gt;Control(<a class="code hl_define" href="group__mci__mode__ctrls.html#ga19fd7d3b74ac48ca74a2e138b3ee9963">ARM_MCI_MONITOR_SDIO_INTERRUPT</a>, 0);</div>
<div class="line"> </div>
<div class="line"><span class="comment">// Read/Wait for SD I/O is disabled by default</span></div>
<div class="line"><span class="comment">// Enable Read/Wait for SD I/O</span></div>
<div class="line">MCIdrv-&gt;Control(<a class="code hl_define" href="group__mci__mode__ctrls.html#gaaa10c5aa7a8108aa59c3734b3eec2e3a">ARM_MCI_CONTROL_READ_WAIT</a>, 1);</div>
<div class="line"><span class="comment">// Disable Read/Wait for SD I/O</span></div>
<div class="line">MCIdrv-&gt;Control(<a class="code hl_define" href="group__mci__mode__ctrls.html#gaaa10c5aa7a8108aa59c3734b3eec2e3a">ARM_MCI_CONTROL_READ_WAIT</a>, 0);</div>
<div class="line"> </div>
<div class="line"><span class="comment">// Suspend Data transfer (SD I/O)</span></div>
<div class="line">MCIdrv-&gt;Control(<a class="code hl_define" href="group__mci__mode__ctrls.html#ga04cf174b0ef13240f26225bf8e45a4a0">ARM_MCI_SUSPEND_TRANSFER</a>, 0<span class="comment">/*argument not used*/</span>);</div>
<div class="line"> </div>
<div class="line"><span class="comment">// Resume Data transfer (SD I/O)</span></div>
<div class="line">MCIdrv-&gt;Control(<a class="code hl_define" href="group__mci__mode__ctrls.html#gac4907319499072fddf61f2f83b0dd966">ARM_MCI_RESUME_TRANSFER</a>, 0<span class="comment">/*argument not used*/</span>);</div>
<div class="ttc" id="agroup__mci__bus__data__width__ctrls_html_gaa28150d8c3789e8cf1bcda318f74a28c"><div class="ttname"><a href="group__mci__bus__data__width__ctrls.html#gaa28150d8c3789e8cf1bcda318f74a28c">ARM_MCI_BUS_DATA_WIDTH_4</a></div><div class="ttdeci">#define ARM_MCI_BUS_DATA_WIDTH_4</div><div class="ttdoc">Bus data width: 4 bits.</div></div>
<div class="ttc" id="agroup__mci__bus__speed__ctrls_html_gaabda746ac7d6b4497358ff655a8ea6be"><div class="ttname"><a href="group__mci__bus__speed__ctrls.html#gaabda746ac7d6b4497358ff655a8ea6be">ARM_MCI_BUS_HIGH_SPEED</a></div><div class="ttdeci">#define ARM_MCI_BUS_HIGH_SPEED</div><div class="ttdoc">SD/MMC: High Speed mode up to 50/52MHz.</div></div>
<div class="ttc" id="agroup__mci__cmd__line__ctrls_html_gaadf8667985731964d57d1ed672e90fd3"><div class="ttname"><a href="group__mci__cmd__line__ctrls.html#gaadf8667985731964d57d1ed672e90fd3">ARM_MCI_BUS_CMD_OPEN_DRAIN</a></div><div class="ttdeci">#define ARM_MCI_BUS_CMD_OPEN_DRAIN</div><div class="ttdoc">Open Drain CMD line (MMC only)</div></div>
<div class="ttc" id="agroup__mci__driver__strength__ctrls_html_ga078d3c3bc7c9335b92e6445a0abafc46"><div class="ttname"><a href="group__mci__driver__strength__ctrls.html#ga078d3c3bc7c9335b92e6445a0abafc46">ARM_MCI_DRIVER_TYPE_B</a></div><div class="ttdeci">#define ARM_MCI_DRIVER_TYPE_B</div><div class="ttdoc">SD UHS-I Driver Type B (default)</div></div>
<div class="ttc" id="agroup__mci__mode__ctrls_html_ga04cf174b0ef13240f26225bf8e45a4a0"><div class="ttname"><a href="group__mci__mode__ctrls.html#ga04cf174b0ef13240f26225bf8e45a4a0">ARM_MCI_SUSPEND_TRANSFER</a></div><div class="ttdeci">#define ARM_MCI_SUSPEND_TRANSFER</div><div class="ttdoc">Suspend Data transfer (SD I/O); returns number of remaining bytes to transfer.</div></div>
<div class="ttc" id="agroup__mci__mode__ctrls_html_ga09a58821e42595f0c2e55f8cc2d32ceb"><div class="ttname"><a href="group__mci__mode__ctrls.html#ga09a58821e42595f0c2e55f8cc2d32ceb">ARM_MCI_DATA_TIMEOUT</a></div><div class="ttdeci">#define ARM_MCI_DATA_TIMEOUT</div><div class="ttdoc">Set Data timeout; arg = timeout in bus cycles.</div></div>
<div class="ttc" id="agroup__mci__mode__ctrls_html_ga19fd7d3b74ac48ca74a2e138b3ee9963"><div class="ttname"><a href="group__mci__mode__ctrls.html#ga19fd7d3b74ac48ca74a2e138b3ee9963">ARM_MCI_MONITOR_SDIO_INTERRUPT</a></div><div class="ttdeci">#define ARM_MCI_MONITOR_SDIO_INTERRUPT</div><div class="ttdoc">Monitor SD I/O interrupt: arg: 0=disabled, 1=enabled.</div></div>
<div class="ttc" id="agroup__mci__mode__ctrls_html_ga21e403e8c3fa8cc75431a513813f0a16"><div class="ttname"><a href="group__mci__mode__ctrls.html#ga21e403e8c3fa8cc75431a513813f0a16">ARM_MCI_CONTROL_RESET</a></div><div class="ttdeci">#define ARM_MCI_CONTROL_RESET</div><div class="ttdoc">Control optional RST_n Pin (eMMC); arg: 0=inactive, 1=active.</div></div>
<div class="ttc" id="agroup__mci__mode__ctrls_html_ga78068f519139f2ae7b09e0608070aaf6"><div class="ttname"><a href="group__mci__mode__ctrls.html#ga78068f519139f2ae7b09e0608070aaf6">ARM_MCI_DRIVER_STRENGTH</a></div><div class="ttdeci">#define ARM_MCI_DRIVER_STRENGTH</div><div class="ttdoc">Set SD UHS-I Driver Strength as specified with arg.</div></div>
<div class="ttc" id="agroup__mci__mode__ctrls_html_ga7f982d2e5aec768307d35a83c65fb3ef"><div class="ttname"><a href="group__mci__mode__ctrls.html#ga7f982d2e5aec768307d35a83c65fb3ef">ARM_MCI_BUS_SPEED</a></div><div class="ttdeci">#define ARM_MCI_BUS_SPEED</div><div class="ttdoc">Set Bus Speed; arg = requested speed in bits/s; returns configured speed in bits/s.</div></div>
<div class="ttc" id="agroup__mci__mode__ctrls_html_ga876d964d0eeacdb16e93f7558a544587"><div class="ttname"><a href="group__mci__mode__ctrls.html#ga876d964d0eeacdb16e93f7558a544587">ARM_MCI_BUS_DATA_WIDTH</a></div><div class="ttdeci">#define ARM_MCI_BUS_DATA_WIDTH</div><div class="ttdoc">Set Bus Data Width as specified with arg.</div></div>
<div class="ttc" id="agroup__mci__mode__ctrls_html_ga889473fbfbdcb89aab4d53cc8a13f615"><div class="ttname"><a href="group__mci__mode__ctrls.html#ga889473fbfbdcb89aab4d53cc8a13f615">ARM_MCI_CONTROL_CLOCK_IDLE</a></div><div class="ttdeci">#define ARM_MCI_CONTROL_CLOCK_IDLE</div><div class="ttdoc">Control Clock generation on CLK Pin when idle; arg: 0=disabled, 1=enabled.</div></div>
<div class="ttc" id="agroup__mci__mode__ctrls_html_ga8b7571e37520c07d8ef4f697f3886715"><div class="ttname"><a href="group__mci__mode__ctrls.html#ga8b7571e37520c07d8ef4f697f3886715">ARM_MCI_BUS_CMD_MODE</a></div><div class="ttdeci">#define ARM_MCI_BUS_CMD_MODE</div><div class="ttdoc">Set CMD Line Mode as specified with arg.</div></div>
<div class="ttc" id="agroup__mci__mode__ctrls_html_ga98853f60bdc085aeeccd66f7bdf22d3d"><div class="ttname"><a href="group__mci__mode__ctrls.html#ga98853f60bdc085aeeccd66f7bdf22d3d">ARM_MCI_UHS_TUNING_OPERATION</a></div><div class="ttdeci">#define ARM_MCI_UHS_TUNING_OPERATION</div><div class="ttdoc">Sampling clock Tuning operation (SD UHS-I); arg: 0=reset, 1=execute.</div></div>
<div class="ttc" id="agroup__mci__mode__ctrls_html_gaaa10c5aa7a8108aa59c3734b3eec2e3a"><div class="ttname"><a href="group__mci__mode__ctrls.html#gaaa10c5aa7a8108aa59c3734b3eec2e3a">ARM_MCI_CONTROL_READ_WAIT</a></div><div class="ttdeci">#define ARM_MCI_CONTROL_READ_WAIT</div><div class="ttdoc">Control Read/Wait for SD I/O; arg: 0=disabled, 1=enabled.</div></div>
<div class="ttc" id="agroup__mci__mode__ctrls_html_gabd3af448e26da5657c1c5a03330476b7"><div class="ttname"><a href="group__mci__mode__ctrls.html#gabd3af448e26da5657c1c5a03330476b7">ARM_MCI_UHS_TUNING_RESULT</a></div><div class="ttdeci">#define ARM_MCI_UHS_TUNING_RESULT</div><div class="ttdoc">Sampling clock Tuning result (SD UHS-I); returns: 0=done, 1=in progress, -1=error.</div></div>
<div class="ttc" id="agroup__mci__mode__ctrls_html_gac4907319499072fddf61f2f83b0dd966"><div class="ttname"><a href="group__mci__mode__ctrls.html#gac4907319499072fddf61f2f83b0dd966">ARM_MCI_RESUME_TRANSFER</a></div><div class="ttdeci">#define ARM_MCI_RESUME_TRANSFER</div><div class="ttdoc">Resume Data transfer (SD I/O)</div></div>
<div class="ttc" id="agroup__mci__mode__ctrls_html_gae97b1a819a5d326b1f1009b0d6d48b5a"><div class="ttname"><a href="group__mci__mode__ctrls.html#gae97b1a819a5d326b1f1009b0d6d48b5a">ARM_MCI_CSS_TIMEOUT</a></div><div class="ttdeci">#define ARM_MCI_CSS_TIMEOUT</div><div class="ttdoc">Set Command Completion Signal (CCS) timeout; arg = timeout in bus cycles.</div></div>
<div class="ttc" id="agroup__mci__mode__ctrls_html_gaf7ede525eabc618fbbb9f7a294c8ed96"><div class="ttname"><a href="group__mci__mode__ctrls.html#gaf7ede525eabc618fbbb9f7a294c8ed96">ARM_MCI_BUS_SPEED_MODE</a></div><div class="ttdeci">#define ARM_MCI_BUS_SPEED_MODE</div><div class="ttdoc">Set Bus Speed Mode as specified with arg.</div></div>
</div><!-- fragment --> 
</div>
</div>
<a id="ga8d61aa42ce78d1864fa928c1f273cbd9" name="ga8d61aa42ce78d1864fa928c1f273cbd9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8d61aa42ce78d1864fa928c1f273cbd9">&#9670;&#160;</a></span>ARM_MCI_GetStatus()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__mci__interface__gr.html#structARM__MCI__STATUS">ARM_MCI_STATUS</a> ARM_MCI_GetStatus </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get MCI status. </p>
<dl class="section return"><dt>Returns</dt><dd>MCI status <a class="el" href="group__mci__interface__gr.html#structARM__MCI__STATUS">ARM_MCI_STATUS</a></dd></dl>
<p>The function <b>ARM_MCI_GetStatus</b> returns the current MCI interface status. </p>

</div>
</div>
<a id="gaac2dbd1c1a98436938c5d0d6248cb700" name="gaac2dbd1c1a98436938c5d0d6248cb700"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaac2dbd1c1a98436938c5d0d6248cb700">&#9670;&#160;</a></span>ARM_MCI_SignalEvent()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ARM_MCI_SignalEvent </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>event</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Callback function that signals a MCI Card Event. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">event</td><td><a class="el" href="group__mci__event__gr.html">MCI Events</a></td></tr>
  </table>
  </dd>
</dl>
<p>The function <b>ARM_MCI_SignalEvent</b> is a callback function registered by the function <a class="el" href="group__mci__interface__gr.html#ga6f34d4ab362e596ddaf23aac093268cf">ARM_MCI_Initialize</a>.</p>
<p>The parameter <em>event</em> indicates one or more events that occurred during driver operation. Each event is encoded in a separate bit and therefore it is possible to signal multiple events within the same call.</p>
<p>Not every event is necessarily generated by the driver. This depends on the implemented capabilities stored in the data fields of the structure <a class="el" href="group__nand__interface__gr.html#structARM__NAND__CAPABILITIES">ARM_NAND_CAPABILITIES</a>, which can be retrieved with the function <a class="el" href="group__nand__interface__gr.html#ga9f2609975c2008d21b9ae28f15daf147">ARM_NAND_GetCapabilities</a>.</p>
<p>The following events can be generated:</p>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadLeft">Parameter <em>event</em>   </th><th class="markdownTableHeadRight">Bit   </th><th class="markdownTableHeadLeft">Description   </th><th class="markdownTableHeadLeft">supported when <a class="el" href="group__nand__interface__gr.html#structARM__NAND__CAPABILITIES">ARM_NAND_CAPABILITIES</a>    </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__event__gr.html#gae2cf8ef238c092e94e96a01602f3a23c">ARM_MCI_EVENT_CARD_INSERTED</a>   </td><td class="markdownTableBodyRight">0   </td><td class="markdownTableBodyLeft">Occurs after Memory Card inserted   </td><td class="markdownTableBodyLeft"><em>always supported</em>    </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__event__gr.html#ga92ba748f9324ec13898f10456f17c8cc">ARM_MCI_EVENT_CARD_REMOVED</a>   </td><td class="markdownTableBodyRight">1   </td><td class="markdownTableBodyLeft">Occurs after Memory Card removal   </td><td class="markdownTableBodyLeft"><em>always supported</em>    </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__event__gr.html#gae69356c75d55103d93ef91ac1bc02b49">ARM_MCI_EVENT_COMMAND_COMPLETE</a>   </td><td class="markdownTableBodyRight">2   </td><td class="markdownTableBodyLeft">Occurs after command completed successfully   </td><td class="markdownTableBodyLeft"><em>always supported</em>    </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__event__gr.html#gab79b3ab4dcd03c38df1e173fa903d822">ARM_MCI_EVENT_COMMAND_TIMEOUT</a>   </td><td class="markdownTableBodyRight">3   </td><td class="markdownTableBodyLeft">Occurs after command timeout   </td><td class="markdownTableBodyLeft"><em>always supported</em>    </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__event__gr.html#ga373aeb3eca0e4c6d159312488a130442">ARM_MCI_EVENT_COMMAND_ERROR</a>   </td><td class="markdownTableBodyRight">4   </td><td class="markdownTableBodyLeft">Occurs after command response error (CRC error or invalid response)   </td><td class="markdownTableBodyLeft"><em>always supported</em>    </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__event__gr.html#gabc3c468dedaed890683360f2c5c65bea">ARM_MCI_EVENT_TRANSFER_COMPLETE</a>   </td><td class="markdownTableBodyRight">5   </td><td class="markdownTableBodyLeft">Occurs after data transfer completed successfully   </td><td class="markdownTableBodyLeft"><em>always supported</em>    </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__event__gr.html#ga614e7c7226adbaa8ec4165bf8b87ef27">ARM_MCI_EVENT_TRANSFER_TIMEOUT</a>   </td><td class="markdownTableBodyRight">6   </td><td class="markdownTableBodyLeft">Occurs after data transfer timeout   </td><td class="markdownTableBodyLeft"><em>always supported</em>    </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__event__gr.html#ga5d2cee5ba6d0e40ad505983155706c29">ARM_MCI_EVENT_TRANSFER_ERROR</a>   </td><td class="markdownTableBodyRight">7   </td><td class="markdownTableBodyLeft">Occurs after data transfer error (CRC failed)   </td><td class="markdownTableBodyLeft"><em>always supported</em>    </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__event__gr.html#ga75a050fdfe04e6816e96c938d6a6c197">ARM_MCI_EVENT_SDIO_INTERRUPT</a>   </td><td class="markdownTableBodyRight">8   </td><td class="markdownTableBodyLeft">Indicates SD I/O Interrupt   </td><td class="markdownTableBodyLeft">data field <em>sdio_interrupt</em> = <span class="XML-Token">1</span>    </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__event__gr.html#ga8161f3960ddf2a3cdc3c4c83148c6099">ARM_MCI_EVENT_CCS</a>   </td><td class="markdownTableBodyRight">9   </td><td class="markdownTableBodyLeft">Indicates a Command Completion Signal (CCS)   </td><td class="markdownTableBodyLeft">data field <em>ccs</em> = <span class="XML-Token">1</span>    </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft"><a class="el" href="group__mci__event__gr.html#gafa8cbcd597a05c64901eeb777cc0b74f">ARM_MCI_EVENT_CCS_TIMEOUT</a>   </td><td class="markdownTableBodyRight">10   </td><td class="markdownTableBodyLeft">Indicates a Command Completion Signal (CCS) Timeout   </td><td class="markdownTableBodyLeft">data field <em>css_timeout</em> = <span class="XML-Token">1</span>   </td></tr>
</table>
<p><b>See also:</b></p><ul>
<li><a class="el" href="group__mci__interface__gr.html#ga5a431da89feabc2b4bc0c27943dff6f2">ARM_MCI_SendCommand</a> </li>
</ul>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">
      <script type="text/javascript">
        <!--
        writeFooter.call(this);
        //-->
      </script> 
    </li>
  </ul>
</div>
</body>
</html>
